When you need to remotely wipe a Mobile Device that’s connected to Exchange Online, you can use Powershell to perform the task quickly. With Clear-Mobile device cmdlet you will remove all data on the device, so this will also delete any photo’s, apps or other personal data on it.
To do this we need to connect to Exchange Online, we use the connector script for this.
List all devices
First we need to get the ID of device. To list all devices from a user run the following cmdlet. This will give you the Identity, which we need later, and some additional info so you can pick out the correct device.
1. #Connect to Exchange Online with the connector script 2. ConnectTo-ExchangeOnline.ps1 3. 4. #List all connected devices 5. Get-MobileDevice -Mailbox <emailaddress> | select Identity, FriendlyName, DeviceOS, DeviceType | FT
Clear the data of the device
To actually remove the data from the device, copy the Identity and run the following cmdlet
1. Clear-MobileDevice -Identity '<identity>' -NotificationEmailAddresses <emailaddress>
The notificationEmailAddress option allows you to receive a confirmation when the wipe is completed. You can specify multiple addresses separated by commas.