Using the Exchange Management Shell to remove ActiveSync Memberships.

Using the Exchange Management Shell to remove ActiveSync Memberships. 

Open the Exchange Management Shell

Type the following command to see the activesync memberships. Get-ActiveSyncDeviceStatistics -Mailbox:”<EmailAlias>” where EmailAlias is the username within ActiveDirrectory Example John Doe would be Get-ActiveSyncDeviceStatistics

This will display information about the ActiveSync Partnerships.  The important part for this example is the “IDENTITY” STRING

RunspaceId                    : 66d412c4-aa04-462b-8d09-b7db985a2e76

FirstSyncTime                 : 7/9/2012 12:33:38 PM

LastPolicyUpdateTime          : 2/23/2014 2:20:28 AM

LastSyncAttemptTime           : 6/10/2014 3:21:28 PM

LastSuccessSync               : 6/10/2014 3:21:30 PM

DeviceType                    : iPhone

DeviceID                      : ApplC8TF6T8UDDP9

DeviceUserAgent               : iOS/7.1 (11D167) dataaccessd/1.0

DeviceWipeSentTime            :

DeviceWipeRequestTime         :

DeviceWipeAckTime             :

LastPingHeartbeat             : 1748

RecoveryPassword              : ********

DeviceModel                   : iPhone3C3

DeviceImei                    :

DeviceFriendlyName            :

Black iPhone 4 DeviceOS                      :

iOS 7.1 11D167 DeviceOSLanguage              :

en DevicePhoneNumber             :

MailboxLogReport              :

DeviceEnableOutboundSMS       :

False DeviceMobileOperator          :

Identity                      :


Guid                          : 70e9dfab-f409-4b84-9b06-exssd8f90dc8e

IsRemoteWipeSupported         : True Status                        :

DeviceOk StatusNote                    :

DeviceAccessState             :

Allowed DeviceAccessStateReason       :

Global DeviceAccessControlRule       :

DevicePolicyApplied           :

Default DevicePolicyApplicationStatus :

AppliedInFull LastDeviceWipeRequestor       :

DeviceActiveSyncVersion       : 14.1

NumberOfFoldersSynced         : 48

SyncStateUpgradeTime          :

Once you have this info and see the Identity string you can remove with this command:

Remove-ActiveSyncDevice -Identity ‘Domain.corp/Users/ExchangeActiveSyncDevices/iPhone§ApplC4YF6T8DFFD9’

**Please use are your own risk!  This should delete the partnership. You can do this through the Exchange Management GUI but I ran into an issue where that was failing.  If the persons name is changed or the Organizational Unit he is in changes.. the GUI may get confused and not apply the proper Identity string.  Using this command you should be able to find it.