ActiveSync – list of devices synced in last 14 days.

If somebody would like to get a list of devices that are synced with Exchange here is a command, could be helpful for someone.

Get-Mailbox -ResultSize Unlimited -OrganizationalUnit 'OU=<YOUR_OU>,DC=<YOUR_DOMAIN>,DC=com' | foreach-object { Get-ActiveSyncDeviceStatistics -mailbox $_.alias |  where {$_.Lastsuccesssync -gt (Get-Date).AddDays("-14")} | foreach-object {$_.Identity} } |  export-csv c:\ActiveSyncList.csv -encoding unicode

It lists devices that have been synced during last 14 days, because sometimes people have old deviced that visible in Exchange.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s