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
- $namespaceName = "root\cimv2\mdm\dmmap"
- $className = "MDM_RemoteWipe"
- $methodName = "doWipeProtectedMethod"
- $session = New-CimSession
- $params = New-Object Microsoft.Management.Infrastructure.CimMethodParametersCollection
- $param = [Microsoft.Management.Infrastructure.CimMethodParameter]::Create("param", "", "String", "In")
- $params.Add($param)
- $instance = Get-CimInstance -Namespace $namespaceName -ClassName $className -Filter "ParentID='./Vendor/MSFT' and InstanceID='RemoteWipe'"
- $session.InvokeMethod($namespaceName, $instance, $methodName, $params)
New to ADSelfService Plus?