10 lines
564 B
PowerShell

$handle = "4" # The handle of the user, returned when the entry was created.
$authorizationServiceRef = $wsmanConnectionObject.NewReference("SELECT * FROM AMT_AuthorizationService WHERE Name='Intel(r) AMT Authorization Service'")
$inputObject = $authorizationServiceRef.CreateMethodInput("GetAclEnabledState")
$inputObject.SetProperty("Handle", $handle)
$outputObject = $authorizationServiceRef.InvokeMethod($inputObject)
$returnValue = $outputObject.GetProperty("ReturnValue")
if($returnValue -like "0")
{
$enableState = $outputObject.GetProperty("Enabled")
}