Andy Andy
asked on
Remove multiple Active sync device
Hello,
Could any one suggets, how i can remove the Active sync device from Exchange,.
i have 500 device ID with me
Thanks,
Andy
Could any one suggets, how i can remove the Active sync device from Exchange,.
i have 500 device ID with me
Thanks,
Andy
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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
ASKER
is it required to be in 1, 2 , 3 format
or i can put it straight in txt file just all device id
or i can put it straight in txt file just all device id
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.
ASKER
this is i have put in text file
GUID
----
ApplDQVFW2TSDKPH
ApplDQVK8GH5F193
GUID
----
ApplDQVFW2TSDKPH
ApplDQVK8GH5F193
Remove header information
GUID
----
Just keep device ID's in input fileApplDQVFW2TSDKPH
ApplDQVK8GH5F193
ASKER
okie.. i will let you know soon
ASKER
i am getting error below
The mobile device ApplDQVFW2TSDKPH cannot be found.
The mobile device ApplDQVFW2TSDKPH cannot be found.
ASKER
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
i mean it will cause any issue. because first i am testing on two user, then i need to do on 500 users
Yes GUID should work..
ASKER
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
so it is correct or we need to mention Device id only
ASKER
means GUID will be different for every one, for every device..right
ASKER
also i want before removing it will ask for confirm
If you want command to ask for confirmation on each device, then remove -Confirm:$false from code.
ASKER
ok thanks.. good support
ASKER
Thanks Subsun for Great support
ASKER
if we remove -Confirm:$false from command .. so it would be below.. please confirm
GC "c:\My Documents\StaleActiveSyncD evices\dev icelist.cs v" | %{Remove-MobileDevice -Identity $_}
GC "c:\My Documents\StaleActiveSyncD
Yes, that's correct.. and input file should be in same format which I explained earlier..
ASKER
ok thanks
ASKER
Hello,
Please suggest, if this command is also OK and not having any impact for user
GC "c:\My Documents\StaleActiveSyncD evices\dev icelist.cs v" | Get-MobileDevice | Remove-MobileDevice
i ran this and found no issue.. so this is OK ?
Thanks
Please suggest, if this command is also OK and not having any impact for user
GC "c:\My Documents\StaleActiveSyncD
i ran this and found no issue.. so this is OK ?
Thanks
Yes, it will work but might be slower..
Directly pipe the GC result to Remove-MobileDevice, it should work bit faster..
Directly pipe the GC result to Remove-MobileDevice, it should work bit faster..
GC "c:\My Documents\StaleActiveSyncDevices\devicelist.csv" | Remove-MobileDevice
ASKER
ok thanks
ASKER
GC C:\input.txt | %{Remove-MobileDevice -Identity $_ -Confirm:$false}