Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Remove multiple Active sync device

Posted on 2016-10-11
23
Medium Priority
?
158 Views
Last Modified: 2016-10-12
Hello,

Could any one suggets, how i can remove the Active sync device from Exchange,.

i have 500 device ID with me

Thanks,
Andy
0
Comment
Question by:Addy Nadia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 15
  • 8
23 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 2000 total points
ID: 41839560
Try with one device..
Remove-MobileDevice -Identity DeviceIDofphone -Confirm:$false

Open in new window


If it works you can use following code to remove bulk devices.
GC C:\input.txt | %{Remove-MobileDevice -Identity $_ -Confirm:$false}

Open in new window

For exchange 2010 use Remove-ActiveSyncDevice command..
1
 
LVL 5

Author Comment

by:Addy Nadia
ID: 41839597
what is GC in this command and is this i need to run in powershell with txt having all device id information ?

GC C:\input.txt | %{Remove-MobileDevice -Identity $_ -Confirm:$false}
0
 
LVL 40

Expert Comment

by:Subsun
ID: 41839620
You need to run the command EMS (Exchange Management Shell).

GC is the alias for Get-Content, which reads the input details from text file C:\input.txt. The input file should have the device ID's listed in following format.
MobiledeviceID1
MobiledeviceID2
MobiledeviceID3

Open in new window

0
Looking for the Wi-Fi vendor that's right for you?

We know how difficult it can be to evaluate Wi-Fi vendors, so we created this helpful Wi-Fi Buyer's Guide to help you find the Wi-Fi vendor that's right for your business! Download the guide and get started on our checklist today!

 
LVL 5

Author Comment

by:Addy Nadia
ID: 41839643
is it required to be in 1, 2 , 3 format
or i can put it straight in txt file just all device id
0
 
LVL 40

Expert Comment

by:Subsun
ID: 41839647
Yes, You can put all device ID's in text file (one device ID per line), it needs not to be in particular order.. I just posted an example.. If you are still confused, post a sample of your input file.
0
 
LVL 5

Author Comment

by:Addy Nadia
ID: 41839655
this is i have put in text file


GUID

----

ApplDQVFW2TSDKPH
ApplDQVK8GH5F193
0
 
LVL 40

Expert Comment

by:Subsun
ID: 41839658
Remove header information
GUID

 ----

Open in new window

Just keep device ID's in input file
ApplDQVFW2TSDKPH
ApplDQVK8GH5F193

Open in new window

0
 
LVL 5

Author Comment

by:Addy Nadia
ID: 41839661
okie.. i will let you know soon
0
 
LVL 5

Author Comment

by:Addy Nadia
ID: 41839666
i am getting error below

The mobile device ApplDQVFW2TSDKPH cannot be found.
0
 
LVL 5

Author Comment

by:Addy Nadia
ID: 41839667
can i give GUID in place of Device id ??

i mean it will cause any issue. because first i am testing on two user, then i need to do on 500 users
0
 
LVL 40

Expert Comment

by:Subsun
ID: 41839672
Yes GUID should work..
0
 
LVL 5

Author Comment

by:Addy Nadia
ID: 41839673
when i run the same with mentioned GUID of devices, it successfully run

so it is correct or we need to mention Device id only
0
 
LVL 5

Author Comment

by:Addy Nadia
ID: 41839674
means GUID will be different for every one, for every device..right
0
 
LVL 5

Author Comment

by:Addy Nadia
ID: 41839676
also i want before removing it will ask for confirm
0
 
LVL 40

Expert Comment

by:Subsun
ID: 41839681
If you want command to ask for confirmation on each device, then remove -Confirm:$false from code.
0
 
LVL 5

Author Comment

by:Addy Nadia
ID: 41839682
ok thanks.. good support
0
 
LVL 5

Author Closing Comment

by:Addy Nadia
ID: 41839683
Thanks Subsun for Great support
0
 
LVL 5

Author Comment

by:Addy Nadia
ID: 41839688
if we remove  -Confirm:$false  from command .. so it would be below.. please confirm

GC "c:\My Documents\StaleActiveSyncDevices\devicelist.csv" | %{Remove-MobileDevice -Identity $_}
0
 
LVL 40

Expert Comment

by:Subsun
ID: 41839689
Yes, that's correct.. and input file should be in same format which I explained earlier..
0
 
LVL 5

Author Comment

by:Addy Nadia
ID: 41839690
ok thanks
0
 
LVL 5

Author Comment

by:Addy Nadia
ID: 41839872
Hello,

Please suggest, if this command is also OK and not having any impact for user

GC "c:\My Documents\StaleActiveSyncDevices\devicelist.csv" | Get-MobileDevice | Remove-MobileDevice

i ran this and found no issue.. so this is OK ?

Thanks
0
 
LVL 40

Expert Comment

by:Subsun
ID: 41839888
Yes, it will work but might be slower..
Directly pipe the GC result to Remove-MobileDevice, it should work bit faster..
GC "c:\My Documents\StaleActiveSyncDevices\devicelist.csv" | Remove-MobileDevice

Open in new window

0
 
LVL 5

Author Comment

by:Addy Nadia
ID: 41840315
ok thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Office 365 is a subscriptions based service which includes services like Exchange Online and Skype for business Online. These services integrate with Microsoft's online version of Active Directory called Azure Active Directory.
Active Directory can easily get cluttered with unused service, user and computer accounts. In this article, I will show you the way I like to implement ADCleanup..
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question