Select-Object -Property Server ?

Oct 17, 2013 at 3:06 PM
Edited Oct 17, 2013 at 3:06 PM
Hi,
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?

Regards,
Mag
Coordinator
Oct 17, 2013 at 3:12 PM
Edited Oct 17, 2013 at 3: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}