Wednesday, 20 August 2014

Powershell - get a list of all connected ActiveSync devices to your Exchange


$devices = @()
$mailboxes = Get-CASMailbox -ResultSize:Unlimited | Where-Object {$_.HasActiveSyncDevicePartnership -eq $true -and $_.ExchangeVersion.ExchangeBuild -ilike "8*"}

foreach ($m in $mailboxes)
{
    $devices += Get-ActiveSyncDeviceStatistics -Mailbox $m.Identity
}

$devices | Export-Csv c:\temp\DeviceStats.csv

No comments:

Post a Comment