Generate a CSV of user’s ActiveSync devices on Exchange 2010

Posted: March 14, 2011 in Exchange, Scripts

Like the heading says…

$MBs = Get-CASMailbox -Filter {hasactivesyncdevicepartnership -eq $true -and -not displayname -like “CAS_{*”}

foreach ($item in $MBs){
$AS = Get-ActiveSyncDeviceStatistics -Mailbox:$item.Name
foreach ($subitem in $AS){
$item.Name + “,” + $subitem.DeviceType + “,” + $subitem.DeviceModel + “,” + $subitem.LastSuccessSync | Out-File C:\temp\ActiveSync.txt -Append
}
}

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