Hello
Here's one with another structure, it goes deeper in the XML structure, namely accessing our MetaInformation object.
Here's one with another structure, it goes deeper in the XML structure, namely accessing our MetaInformation object.
$s = Get-RDM-Session |
where {$_.Session.Kind -eq "RDPConfigured"} |
foreach { New-Object PSObject -Property @{
Name = $_.Session.ToString()
Domain = ($_.Session.GetProperty("MetaInformation", "Domain"))
Architecture = ($_.Session.GetProperty("MetaInformation", "Architecture"))
OS = ($_.Session.GetProperty("MetaInformation", "OS"))
Description = ($_.Session.GetProperty("", "Description"))
}};
## save to csv, the field names are used as column headers.
$s | export-csv c:\temp\sessions.csv -notypeinformation;