On the EPM API: http://localhost/MBSDKService/MsgSDK.asmx
ListMachine
Use the ListMachine function to get the GUIDs you are interested in.
Then you have two possible functions if you need more information:
GetMachineData for Simple Values
<Columns><Column>Computer."Device Name"</Column><Column>Computer.System.Model</Column></Columns>
Script Example
$mycreds = Get-Credential -Credential "Leblogosd\david"
$ldWS = New-WebServiceProxy -uri http://EPM2021/MBSDKService/MsgSDK.asmx?WSDL -Credential $mycreds
$ListDevices = $ldWS.ListMachines("").Devices
#GUID DeviceName DomainName LastLogin
foreach ($ListDevice in $ListDevices) {
$DeviceLDMSName = $ListDevice.DeviceName
$DeviceLDMSGUID = $ListDevice.GUID
$GetMachineData = $ldWS.GetMachineData("$DeviceLDMSGUID","<Columns><Column>Computer.""Device Name""</Column><Column>Computer.System.Model</Column></Columns>")
$device_name = $GetMachineData.MachineData[0].Value
$device_Model = $GetMachineData.MachineData[1].Value
Write-host "$device_name = $device_Model"
}
GetMachineDataEx for Multiple Values
<Columns><Column>Computer."Device Name"</Column><Column>Computer.Environment.Variable.Value</Column></Columns>
To put it simply, if your ColumnSet requires a qualifier, it will be a GetMachineDataEx.