Exchange cmdlets to manage ActiveSync devices?

When going into the ECP and looking at a users mailbox, I go into their Mobile Devices to remove a device that the user no longer uses, but I get the following error;

The ActiveSyncDevice b8e0a9c0-44b3-4438-9f14-e918fe34dc1d cannot be found.

What are the cmds that I could use to force the device removal from the Exchange 2010 Server?

Is there a script somewhere that I could use?

At this point I cant block or delete the device.

Thanks in advance.
2013-09-22-11-43-22-View-Mobile-.jpg
GCTTechsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Stelian StanNetwork AdministratorCommented:
0
Vaseem MohammedCommented:
Recently I worked on a simple script to find ActiveSync devices for all mailboxes based on last successful sync
 $Report=@()

$mbx = get-casmailbox -resultsize unlimited | where {$_.HasActiveSyncDevicePartnership -eq $true};

$mbx | foreach {
“Processing: “+$_.name
$name = $_.name;
$Devices = get-activesyncdevicestatistics -mailbox $_.identity | where {$_.LastSuccessSync -le (Get-Date).AddDays("-30")};
if($Devices){
foreach($Device in $Devices){
” Device: “+$Device.DeviceType
$Report += $Device
}
}
}
 $Report | Export-Csv -path c:\powershell\staledevices.csv -NoTypeInformation

Open in new window

To Delete the records which are older than 30 days (exported above)
Import-Csv -path c:\powershell\staledevices.csv |foreach {remove-activesyncdevice -identity $_.guid -confirm:$false}

Open in new window


see if it suites your needs.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SubsunCommented:
Have you moved this user to new OU? You can refer the following article which explains how to remove the ActiveSync device partnerships using Remove-ActiveSyncDevice. Please let us know if you have any questions.

http://ficility.net/2013/04/17/exchange-2010-the-activesyncdevice-identity-cannot-be-found/
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.