/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 9 months ago

Answers (2)

Answer Summary:
Posted by: gwir 9 months 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 8 months ago
    • Excellent! Thanks for the feedback ! - gwir 8 months ago
  • I would not consider this a true\proper clean or wipe, but it works - Channeler 8 months ago
    • The « doWipeProtectedMethod » also clean free space, and can not be interrupt. If you restart the computer the processe continue at next boot. - gwir 8 months ago
Posted by: psaussey 9 months ago
Senior Purple Belt
0

thanks will give it a try

 
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