Enumerating and Modifying Terminal Server Attributes with PowerShell
Dmitry discusses how PowerShell can be used to enumerate and modify some common Terminal Server configurations. This works with both the Server 2003 and Server 2008 versions of Terminal Services. He writes...
Getting TS attributes
Retrieving terminal services properties is easy. You just execute Get-QADUser and the objects retrieved will have the corresponding properties - for your convenience, all starting with Ts.
PS C:\> get-qaduser "Dmitry Sotnikov" | format-list Ts*
TsProfilePath : \\server\tsprofiles\DSotnikov
TsHomeDirectory : \\server\tshome\DSotnikov
TsHomeDrive : P:
TsAllowLogon : True
TsRemoteControl : 0
TsMaxDisconnectionTime : 00:00:00
TsMaxConnectionTime : 00:00:00
TsMaxIdleTime : 00:00:00
TsReconnectionAction : 1
TsBrokenConnectionAction : 0
TsConnectClientDrives : True
TsConnectPrinterDrives : True
TsDefaultToMainPrinter : True
TsWorkDirectory : c:\
TsInitialProgram : C:\Program Files\Quest\Initialize.exe
Important: Terminal services properties are only available when AD cmdlets are run on Windows Server 2003 or 2008. Workstation operating systems (XP, Vista) do not support programmatic TS administration so the properties will not be retrieved.
He also includes a nice list of each of the attributes along with a detailed description. Handy! Read the whole post at: http://dmitrysotnikov.wordpress.com/2008/02/13/managing-terminal-services-attributes-with-powershell/

Email This!
Digg it!
Del.icio.us
Reddit!
Newsvine