23 lines
1.1 KiB
PowerShell
23 lines
1.1 KiB
PowerShell
$endpointAccessControlServiceRef = $wsmanConnectionObject.NewReference("SELECT * FROM AMT_EndpointAccessControlService WHERE Name='Intel(r) AMT Endpoint Access Control Service'")
|
|
$endpointAccessControlServiceInstance = $endpointAccessControlServiceRef.Get()
|
|
$enabledState = $endpointAccessControlServiceInstance.GetProperty("EnabledState")
|
|
if($enabledState -like "2")
|
|
{
|
|
$inputObject = $endpointAccessControlServiceRef.CreateMethodInput("GetPosture")
|
|
$inputObject.SetProperty("PostureType", "0")
|
|
$outputObject = $endpointAccessControlServiceRef.InvokeMethod($inputObject)
|
|
$returnValue = $outputObject.GetProperty("ReturnValue")
|
|
if($returnValue -like "0")
|
|
{
|
|
$signedPosture = $outputObject.GetProperty("SignedPosture")
|
|
$postureChangeHash = $outputObject.GetProperty("PostureChangeHash")
|
|
}
|
|
$inputObject = $endpointAccessControlServiceRef.CreateMethodInput("GetPostureHash")
|
|
$inputObject.SetProperty("PostureType", "0")
|
|
$outputObject = $endpointAccessControlServiceRef.InvokeMethod($inputObject)
|
|
$returnValue = $outputObject.GetProperty("ReturnValue")
|
|
if($returnValue -like "0")
|
|
{
|
|
$postureChangeHash = $outputObject.GetProperty("PostureChangeHash")
|
|
}
|
|
} |