6 lines
604 B
PowerShell

$handleToDelete = "1" # The handle of the application that should be removed.
$thirdPartyDataStorageAdministrationServiceRef = $wsmanConnectionObject.NewReference("SELECT * FROM AMT_ThirdPartyDataStorageAdministrationService WHERE Name='Intel(r) AMT Third Party Data Storage Administration Service'")
$inputObject = $thirdPartyDataStorageAdministrationServiceRef.CreateMethodInput("AdminRemoveApplication")
$inputObject.SetProperty("Handle", $handleToDelete)
$outputObject = $thirdPartyDataStorageAdministrationServiceRef.InvokeMethod($inputObject)
$returnValue = $outputObject.GetProperty("ReturnValue")