Link to home
Start Free TrialLog in
Avatar of ewumstory
ewumstory

asked on

Remove all activesync devices in a mailbox in Exchange 2007

Somehow, when I started syncing a new Android device to our Exchange 2007 (SBS2008) server, so many individual device partnerships for this device flooded my mailbox account, that it refused to sync my WinMo 6.5 phone - probably timed out. In any case ther are so many in there (dozens, maybe more. I used the Get-ActiveSyncDeviceStatistics -Mailbox  cmdlet and they scrolled by so fast that I couldn't get a count) that it takes about 8 minutes or more each to delete them one by one. I'm trying to find a way to delete them all with a single statement in the Management console. I know the Remove-ActiveSyncDevice –Identity <DeviceID> cmdlet will delete one (I've been successful with this) but I need a way that I can insert a wildcard in the DeviceID becuase each divice ID has ten or so unique integers in the end of the string. Any ideas?
ms
Avatar of ranga_matta
ranga_matta

i would suggest you to wipe the mobile and start from the scratch.
Why not do:

Get-ActiveSyncDevice -Mailbox "<your mailbox" | remove-ActiveSyncDevice

That should remove all of them from your mailbox
Avatar of ewumstory

ASKER

[PS] C:\Windows\system32>Get-ActiveSyncDevice -Mailbox markstory | remove-Active
SyncDevice

MegaNuk3,

Thanks for the suggestion. However, this is the response I got from the Management Shell when I ran this cmdlet (in the examples, I substituted <mymailbox>):

The term 'Get-ActiveSyncDevice' is not recognized as the name of a cmdlet, func
tion, script file, or operable program. Check the spelling of the name, or if a
 path was included, verify that the path is correct and try again.
At line:1 char:21
+ Get-ActiveSyncDevice <<<<  -Mailbox <mymailbox> | remove-ActiveSyncDevice
    + CategoryInfo          : ObjectNotFound: (Get-ActiveSyncDevice:String) []
   , CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

After trying this cmdlet, I ran "Get-ActiveSyncDeviceStatistics -Mailbox: <mymailbox>" again to make sure that the path is correct, and it succeeded.

ms
ranga matta,

I am willing to try this, but are you certain that this would delete all partnerships for this device on the server?

ms
ASKER CERTIFIED SOLUTION
Avatar of MegaNuk3
MegaNuk3
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks MegaNuk3. I actually tried this alternative before I saw your correction - but it works, or actually is working. I first selected "y" when prompted for comfirmation, but it only deleted one of the many partnerships. When prompted for the next however, I selected "A" for all and it has been working since then - 75 minutes so far. But I expected this and am confident this is the solution. Now all I have to figure out is why it happend in the first place to avoid repeating it.
ms
75 minutes? Wow, that is a lot of device pairings.