Remotely Wipe workstation

Remotely Wipe workstation

Recently I needed a way to remotely wipe a machine, and we do not currently have any MDM licenses. So I found a quick powershell script that connected to the Windows 10+ WMI / MDM method and can do a factory reset with full wipe. 


More info


  1. $namespaceName = "root\cimv2\mdm\dmmap"
  2. $className = "MDM_RemoteWipe"
  3. $methodName = "doWipeProtectedMethod"

  4. $session = New-CimSession

  5. $params = New-Object Microsoft.Management.Infrastructure.CimMethodParametersCollection
  6. $param = [Microsoft.Management.Infrastructure.CimMethodParameter]::Create("param", "", "String", "In")
  7. $params.Add($param)

  8. $instance = Get-CimInstance -Namespace $namespaceName -ClassName $className -Filter "ParentID='./Vendor/MSFT' and InstanceID='RemoteWipe'"
  9. $session.InvokeMethod($namespaceName, $instance, $methodName, $params)

                New to ADSelfService Plus?