serverRoom/amt-sdk-20-0-0-1/IntelvProModule/PS_Snippets/Storage/Storage-Retrive Information (General flow)2a.ps1

10 lines
642 B
PowerShell

$thirdPartyDataStorageServiceRef = $wsmanConnectionObject.NewReference("SELECT * FROM AMT_ThirdPartyDataStorageService WHERE Name='Intel(r) AMT Third Party Data Storage Service'")
$inputObject = $thirdPartyDataStorageServiceRef.CreateMethodInput("GetBytesAvailable")
# $sessionHandle is the session handle returned by 'RegisterApplication' method.
$inputObject.SetProperty("SessionHandle", $sessionHandle.ToString())
$outputObject = $thirdPartyDataStorageServiceRef.InvokeMethod($inputObject)
$returnValue = $outputObject.GetProperty("ReturnValue")
if($returnValue -like "0")
{
$bytesAvailable = $outputObject.GetProperty("BytesAvailable")
}