tscmd Print E-mail
Written by Ton Siemons, Monday, 19 March 2007

For years i have been using tscmd as command prompt tool to control Terminal server properties for users. This nifty little tool let you both query and adapt those difficult to script TS properties from the command line. For the command prompt impaired amongst us i'll show you few code examples with the help of dsquery.

 

Executing TScmd without parameters gives the following:

tscmd Usage Information
tscmd <Server> <User> <Setting> [New Value]

Settings:
        InitialProgram
        WorkingDirectory
        InheritInitialProgram
        AllowLogonTerminalServer
        TimeoutConnection
        TimeoutDisconnect
        TimeoutIdle
        DeviceClientDrives
        DeviceClientPrinters
        DeviceClientDefaultPrinter
        BrokenTimeoutSettings
        ReconnectSettings
        ModemCallbackSettings
        ModemCallbackPhoneNumber
        ShadowingSettings
        TerminalServerProfilePath
        TerminalServerHomeDir
        TerminalServerHomeDirDrive
 

To change the profilepath for terminal server type: tscmd <DC> <user> \\server\share$\ <user>

To change TS profile paths for every account in an OU type:

for /f "Tokens=*" %%i in ('dsquery user "OU=Employees,OU=production,DC=Domain,DC=local" -o samid -limit 100000') do tscmd <DC> %%i TerminalServerProfilePath \\server\share$\%%i
  

No need to say tscmd and dsquery need to be in the current path or defined in the search path. DSquery is default part of Windows 2003 SP1 and higher. For use on Windows XP and Vista install the 2003 support tools.

Download the tool at: http://www.systemtools.com/cgi-bin/download.pl?tscmd

If you do have any questions about this tool do not hesitate to post those in the forum 

Comments
Add NewSearchRSS
Afzaal - Running into an error Unregistered | 2008-05-12 20:05:43
When I type the above command to change it for everyone in an OU< I get an error saying %%i was unexpected at this time.

Also, what would be the command to read the usernames from a text file for example.

Any help will be greatly appreciated. I want to change the path for 60 of the 100 users.
Kashif - tscmd.exe for personal server. Unregistered | 2008-08-04 07:49:06
Dear sir!!

Can i use tscmd to manage my own developed server (voip server) written in C#.

If yes please porvide me link for some guide.

Regards
Write comment
Name:
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 

Powered by JoomlaCommentCopyright (C) 2006 Frantisek Hliva. All rights reserved.Homepage: http://cavo.co.nr/

 
< Prev   Next >