22 lines
1.1 KiB
PowerShell
22 lines
1.1 KiB
PowerShell
$storageAdministrationServiceRef = $wsmanConnectionObject.NewReference("SELECT * FROM AMT_ThirdPartyDataStorageAdministrationService WHERE Name='Intel(r) AMT Third Party Data Storage Administration Service'")
|
|
$inputObject = $storageAdministrationServiceRef.CreateMethodInput("EnumerateStorageAllocEntries")
|
|
$outputObject = $storageAdministrationServiceRef.InvokeMethod($inputObject)
|
|
$returnValue = $outputObject.GetProperty("ReturnValue")
|
|
if($returnValue -like "0")
|
|
{
|
|
$handles = $outputObject.GetProperty("Handles")
|
|
for($i = 0; $i -lt $handles.Count; $i++)
|
|
{
|
|
$inputObject = $storageAdministrationServiceRef.CreateMethodInput("GetStorageAllocEntry")
|
|
$inputObject.SetProperty("Handle", $handles.Item($i).ToString())
|
|
$outputObject = $storageAdministrationServiceRef.InvokeMethod($inputObject)
|
|
$returnValue = $outputObject.GetProperty("ReturnValue")
|
|
if($returnValue -like "0")
|
|
{
|
|
$applicationName = $outputObject.GetProperty("ApplicationName")
|
|
$vendorName = $outputObject.GetProperty("VendorName")
|
|
$isPartner = $outputObject.GetProperty("IsPartner")
|
|
$totalAllocationSize = $outputObject.GetProperty("TotalAllocationSize")
|
|
}
|
|
}
|
|
} |