Skip to content

remote_wipe.ps1

Corey Watson edited this page Dec 19, 2025 · 1 revision

remote_wipe.ps1

Initiates a remote wipe of the Windows device using the MDM RemoteWipe CSP.

Overview

Initiates a remote wipe of the Windows device using the MDM RemoteWipe CSP. This completely erases all data on the device and resets it to factory state.

WARNING: THIS ACTION IS IRREVERSIBLE

ALL DATA ON THE DEVICE WILL BE PERMANENTLY DELETED

Purpose

Initiates a remote wipe of the Windows device using the MDM RemoteWipe CSP. This completely erases all data on the device and resets it to factory state.

Prerequisites

  • Windows 10/11 (MDM enrolled or Azure AD joined)
  • Administrator privileges
  • Device must have MDM RemoteWipe capability

Configuration

Required Inputs

None

Behavior

  1. Creates CIM session to local MDM namespace
  2. Retrieves MDM_RemoteWipe instance
  3. Invokes the doWipeMethod
  4. Device begins factory reset process

Security Notes

  • THIS IS A DESTRUCTIVE OPERATION
  • Use only on lost/stolen devices or for secure decommissioning
  • Cannot be undone once initiated
  • Ensure proper authorization before running

Exit Codes

  • 0 = Wipe initiated successfully
  • 1 = Failure (CIM session, instance not found, or wipe failed)

Example Output

[ INITIALIZING REMOTE WIPE ]
--------------------------------------------------------------
CIM Session          : Created
MDM Instance         : Found

[ EXECUTING WIPE ]
--------------------------------------------------------------
Status               : Invoking doWipeMethod...
Result               : Wipe initiated successfully

[ FINAL STATUS ]
--------------------------------------------------------------
REMOTE WIPE INITIATED - DEVICE WILL RESET

[ SCRIPT COMPLETED ]
--------------------------------------------------------------

Version History

  • 2024-12-01 v1.0.0 - Initial release - migrated from SuperOps

Links

Clone this wiki locally