Select-Object -Property Server ?

Oct 17, 2013 at 4:06 PM
Edited Oct 17, 2013 at 4:06 PM
thx 4 that great Tool! I'm tring following Code :

Get-TSSession -computername Server01 | Select-Object -Property Server

But instead of the Servername I got "Cassia.Impl.TerminalServer" as Output...? What can I do?

Oct 17, 2013 at 4:12 PM
Edited Oct 17, 2013 at 4:14 PM
The Server property contains a Cassia.Impl.TerminalServer objects which is an object with additional properties, one of which is ServerName. You can replace Select-Object with Foreach-Object and access the ServerName property:

Get-TSSession -computername Server01 | Foreach-Object {$_.Server.ServerName}