Skip to content

Instantly share code, notes, and snippets.

View dallin's full-sized avatar
💻
building something great

Dallin Hitchcock dallin

💻
building something great
View GitHub Profile
@dallin
dallin / RemoteWipe.ps1
Created April 12, 2023 19:40
Remote wipe a Windows 10/11 device
$namespaceName = "root\cimv2\mdm\dmmap"
$className = "MDM_RemoteWipe"
$methodName = "doWipeMethod"
$session = New-CimSession
$params = New-Object Microsoft.Management.Infrastructure.CimMethodParametersCollection
$param = [Microsoft.Management.Infrastructure.CimMethodParameter]::Create("param", "", "String", "In")
$params.Add($param)