12 lines
687 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("GetUserAclEntryEx")
$inputObject.SetProperty("Handle", $handle)
$outputObject = $authorizationServiceRef.InvokeMethod($inputObject)
$returnValue = $outputObject.GetProperty("ReturnValue")
if($returnValue -like "0")
{
$digestUsername = $outputObject.GetProperty("DigestUsername")
$accessPermission = $outputObject.GetProperty("AccessPermission")
$realms = $outputObject.GetProperty("Realms")
}