Powershell: Gain Visibility of Mobile Devices within Your Exchange ActiveSync Environment

In the era of Bring Your Own Device (BYOD), more users than ever are connecting to Exchange through ActiveSync without ITs knowledge.

You can easily view all of the devices connecting to your Exchange servers through ActiveSync. The following identify the number ActiveSync device associations and exports mailbox and device information for reporting and maintenance.

List this:
$devicelist = @()
$userlist=Get-CASMailbox -results unlimited | where {$_.ExchangeVersion -like "*14*"} | select name,samaccountname
Run this:
$userlist | foreach {
 $name=$_.name;
 $device = get-ActiveSyncDeviceStatistics -mailbox $_.samaccountname;
 $device | foreach { 
  $devicelist += ($_ | select-object @{Name="Name";Expression={"$name"}},DeviceType,DeviceID,DeviceFriendlyName,DeviceModel,DeviceUserAgent, `
  DeviceOS,IsRemoteWipeSupported,NumberOfFoldersSynced)} }
$devicelist | Out-GridView

No comments:

Post a Comment