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

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

Get more stuff like this

IT, Office365, Smart Home, PowerShell and Blogging Tips

I hate spam to, so you can unsubscribe at any time.

Leave a Comment