Wipe Mobile Device with Powershell

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.

#Connect to Exchange Online with the connector script
ConnectTo-ExchangeOnline.ps1

#List all connected devices
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

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.

Leave a Comment

0 Shares
Tweet
Pin
Share
Share