7 lines
446 B
PowerShell

# $handle is the handle that was returned by the lock request.
$auditLogRef = $wsmanConnectionObject.NewReference("SELECT * FROM AMT_AuditLog WHERE Name='Intel(r) AMT:Audit Log'")
$inputObject = $auditLogRef.CreateMethodInput("SetAuditLock")
$inputObject.SetProperty("Flag", "2")
$inputObject.SetProperty("Handle", $handle.ToString())
$outpObject = $auditLogRef.InvokeMethod($inputObject)
$returnValue = $outpObject.GetProperty("ReturnValue")