PowerShell Command | Mailbox Statistics Export | Exchange 2007

Posted on 2012-09-21
Last Modified: 2012-09-29
1- We need to create a report with the statistics informations below for all Active Sync users.
2- We need to run this command and have the results saved into a CSV, TXT file because are thousands of users.

Windows servers 2003
Exchange Servers 2007 Service Pack 3 Rollup 4
- FirstSyncTime : 12/22/2007 1:34:10 AM
- LastSyncAttemptTime : 1/14/2008 7:45:15 AM
- LastSuccessSync : 1/14/2008 7:45:15 AM
- DeviceType : PocketPC
- DeviceID : *******************************
- DeviceModel : WIZA100
- DeviceIMEI : ************21900
- DeviceFriendlyName : Pocket_PC
- Identity :\AirSync-PocketPC-*******************************
Question by:osagarana
    LVL 9

    Assisted Solution

    by:Benjamin MOREAU
    Try this command :

    Get-mailbox -ResultSize Unlimited  | Get-ActiveSyncDeviceStatistics | export-csv c:\export.csv
    LVL 52

    Assisted Solution

    by:Manpreet SIngh Khatra
    You can also try with

    Get-Mailbox | ForEach {Get-ActiveSyncDeviceStatistics -Mailbox:$_.Identity} | ft Alias, Device*, Activesync*

    List Exchange ActiveSync users and device information in Exchange 2007 and Exchange 2010

    Identifying Exchange ActiveSync Users with PowerShell

    - Rancy
    LVL 1

    Accepted Solution

    Hello To everyone
    At first thanks for fast reply. Based on the tw awsers provided by our colleagues, I´ve created the command below.

    Get-Mailbox -Resultsize unlimited | ForEach {Get-ActiveSyncDeviceStatistics -Mailbox:$_.Identity} | Select-Object identity, DeviceFriendlyName, Devicetype, DeviceUserAgent, FirstSyncTime, LastSuccessSync | Export-Csv -Path c:\temp\test1.csv -Encoding 'Unicode' -NoTypeInformation
    LVL 1

    Author Comment

    I've requested that this question be closed as follows:

    Accepted answer: 0 points for osagarana's comment #a38422655

    for the following reason:

    Colaborative Answers made me get a good result
    LVL 9

    Expert Comment

    by:Benjamin MOREAU
    If you think that it's collabortive job, you can share your points between experts...
    LVL 52

    Expert Comment

    by:Manpreet SIngh Khatra
    osagarana: I too say if the issue was resolved with collaborative feedback points should be awarded :)

    - Rancy

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
    Easy CSR creation in Exchange 2007,2010 and 2013
    To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…
    The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now