remote wipe at next connection with SMA


We need to remote wipe a computer next time it connects to our network

is there a way or script i can use with the sma or sda


1 Comment   [ + ] Show comment
  • More information at the source https://docs.microsoft.com/en-us/windows/win32/dmwmibridgeprov/mdm-remotewipe - gwir 1 month ago

Answers (2)

Answer Summary:
Posted by: gwir 1 month ago
Second Degree Brown Belt

Top Answer

You can try this shell script who initiate a factory reset

# Bascule de powershell en 64 bits

if ($PSHOME -like "*syswow64*") {
Write-Output 'Relaunching as x64'
& (Join-Path ($PSHOME -replace 'syswow64', 'sysnative') powershell.exe) `
-File $Script:MyInvocation.MyCommand.Path `

# Debut du script

$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")

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

Inspired by
Source https://techcommunity.microsoft.com/t5/windows-deployment/factory-reset-windows-10-without-user-intervention/m-p/1349038/highlight/true#M559

  • Works great. Added it to my SMA and called it Doomsdayscript. - CarstenBuscher 1 month ago
    • Excellent! Thanks for the feedback ! - gwir 1 month ago
  • I would not consider this a true\proper clean or wipe, but it works - Channeler 1 month ago
    • The « doWipeProtectedMethod » also clean free space, and can not be interrupt. If you restart the computer the processe continue at next boot. - gwir 1 month ago
Posted by: psaussey 1 month ago
Senior Purple Belt

thanks will give it a try

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ