/build/static/layout/Breadcrumb_cap_w.png

remote wipe at next connection with SMA

Hi

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

thansk


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

Answers (2)

Answer Summary:
Posted by: gwir 2 years ago
Second Degree Brown Belt
2

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 `
@args
Exit
}

# 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")
$params.Add($param)

$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


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

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

Share

 
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