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
ewumstoryAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

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

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

That should remove all of them from your mailbox
ewumstoryAuthor Commented:
[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
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

ewumstoryAuthor Commented:
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
MegaNuk3Commented:
Try
[PS] C:\Windows\system32>Get-ActiveSyncDeviceStatistics -Mailbox markstory | remove-ActiveSyncDevice

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
ewumstoryAuthor Commented:
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
MegaNuk3Commented:
75 minutes? Wow, that is a lot of device pairings.
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.