remote_wipe.ps1 - limehawk/rmm-scripts GitHub Wiki
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
- Creates CIM session to local MDM namespace
- Retrieves MDM_RemoteWipe instance
- Invokes the doWipeMethod
- 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
- View Script Source
- Scripts - Back to script index