Remove Old ActiveSync Devices Exchange Server 2010 / 2013 / 2016 / 0365

This article will show you how to find old ActiveSync device on Microsoft Exchange Server 2010/2013/2016/0365 and remove them from Exchange.

You might say why do I need this? Well the answer Is because Exchange Server has 10 devices limit per user you need to make sure users are not passing the limit.

The first step in this process Is to view all old ActiveSync devices using cmdlet below:

Note: This will show all devices older than 365 days. You can change this by modifying the number of days’ section.

Get-ActiveSyncDevice -ResultSize unlimited | Get-ActiveSyncDeviceStatistics | where {$_.LastSyncAttemptTime -lt (get-date).adddays(-365)} | out-gridview

Step 2:

Once you see and review all devices run the cmdlet below to export the devices GUID:

Get-ActiveSyncDevice -ResultSize unlimited| Get-ActiveSyncDeviceStatistics | where {$_.LastSyncAttemptTime -lt (get-date).adddays(-365)} | select-object guid | Out-File C:\Temp\list.txt

Step 3:

Once you have the list run the code below to remove the old devices:

Get-Content .\list.txt | Get-ActiveSyncDevice | Remove-ActiveSyncDevice

One Reply to “Remove Old ActiveSync Devices Exchange Server 2010 / 2013 / 2016 / 0365”

  1. great work! thnx!! 🙂 it worked.
    small detail,

    Get-Content .\list.txt | Get-ActiveSyncDevice | Remove-ActiveSyncDevice

    make this get-content driveletter:\directorywherethetxtfileresides\list.txt
    (like: c:\list\list.txt)

    .\list is nice if you have the temp dir in your path entry in windows. if not it will not detect. but the rest works flawless.thnx again!.

Comments are closed.