Command-line control of Terminal Services Christa Anderson.

Slides:



Advertisements
Similar presentations
WEBCAST SCHEDULE Todays event will run one-hour long. Here are the expected times for each segment of the webcast: :00 – :05: Moderator introduces the.
Advertisements

SAM 2007 v3.0 The Student Experience Including SAM Projects and Course Assess assignments.
Introduction to Matlab Workshop Matthew Johnson, Economics October 17, /13/20151.
Week 6: Chapter 6 Agenda Automation of SQL Server tasks using: SQL Server Agent Scheduling Scripting Technologies.
The Web Warrior Guide to Web Design Technologies
Tuning 2000/XP/.NET What should you tweak, and what should you replace? Presented by Mark Minasi author of Mastering Windows 2000 Server MR&D /
Server-Side vs. Client-Side Scripting Languages
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 5: Managing File Access.
11 SUPPORTING LOCAL USERS AND GROUPS Chapter 3. Chapter 3: Supporting Local Users and Groups2 SUPPORTING LOCAL USERS AND GROUPS  Explain the difference.
10.1 © 2004 Pearson Education, Inc. Exam Planning, Implementing, and Maintaining a Microsoft Windows Server 2003 Active Directory Infrastructure.
World Class Security Experts © Copyright 2004 SkyView Partners LLC. All rights reserved. How IT is affected by Sarbanes-Oxley Act.
Chapter 5: Configuring Users and Groups. Windows Vista User Accounts User accounts are the primary means of authentication Built-in Accounts –Administrator:
Slide 1 FastFacts Feature Presentation 12/16/2014 To dial in, use this phone number and participant code… Phone number: Participant code:
7.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 7: Introducing Group Accounts.
MCDST : Supporting Users and Troubleshooting a Microsoft Windows XP Operating System Chapter 5: User Environment and Multiple Languages.
Check Disk. Disk Defragmenter Using Disk Defragmenter Effectively Run Disk Defragmenter when the computer will receive the least usage. Educate users.
Microsoft Windows XP Remote Desktop Alvin Loh Program Manager Terminal Services Group.
File sharing. Connect the two win 7 systems with LAN card Open the network.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 21: Publishing Your Pages on the Web.
1 Chapter Overview Creating User and Computer Objects Maintaining User Accounts Creating User Profiles.
Configuring Task Scheduler Lesson 9. Skills Matrix Technology SkillObjective Domain SkillDomain # Understanding Task Scheduler Configure and manage the.
Creating a Web Page HTML, FrontPage, Word, Composer.
Printing Systems August 19, 2003 © 2003 IBM Corporation iSeries Infoprint Announcement Enhancements to Infoprint Server and Infoprint Designer Guest speaker:
Ch 11 Managing System Reliability and Availability 1.
Chapter 5 Roles and features. objectives Performing management tasks using the Server Manager console Understanding the Windows Server 2008 roles Understanding.
Agenda What is Computer Programming? The Programming Process
Using Data Active Server Pages Objectives In this chapter, you will: Learn about variables and constants Explore application and session variables Learn.
WEBCAST SCHEDULE Today’s event will run one-hour long. Here are the expected times for each segment of the Webcast: :00 – :05: Moderator introduces the.
System for Administration, Training, and Educational Resources for NASA SATERN Overview for Learners May 2006.
Advanced Web Design Scripting Tutorial Chapters. Scripting Intro The scripting part of the forthcoming Advanced Web Design textbook introduces you to.
6.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 6: Administering User Accounts.
5.1 © 2004 Pearson Education, Inc. Lesson 5: Administering User Accounts Exam Microsoft® Windows® 2000 Directory Services Infrastructure Goals 
Domino for iSeries Taking the mystery out of Migrating Domino 5 to Domino 6 on iSeries Walter Scanlan
JavaScript, Fourth Edition
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 5: Managing File Access.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
Module 7: Fundamentals of Administering Windows Server 2008.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
TACTEAM -- Dallas 1 Whacking Spam with ISA Server 2000 Thomas W Shinder MD.
4.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 4: Organizing a Disk for Data.
The Capabilities of AdminP Carilyn E. Daniel KMAS Consulting.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
MCTS Guide to Microsoft Windows Server 2008 Applications Infrastructure Configuration (Exam # ) Chapter Five Windows Server 2008 Remote Desktop Services,
My Workspace ELearning in Sakai Randy Graff, PhD HSC Training.
WEBCAST SCHEDULE Today’s event will run one-hour long. Here are the expected times for each segment of the Webcast:  :00 – :05: Moderator introduces the.
XP Tutorial 10New Perspectives on HTML and XHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial.
XP Tutorial 8 Adding Interactivity with ActionScript.
ASP. What is ASP? ASP stands for Active Server Pages ASP is a Microsoft Technology ASP is a program that runs inside IIS IIS stands for Internet Information.
Exploring Adobe Presenter Presented By: Immersion Team
Administering Group Policy Chapter Eleven. Exam Objectives in this Chapter  Plan a Group Policy strategy using Resultant Set of Policy Planning mode.
Introduction to Taverna Online and Interaction service Aleksandra Pawlik University of Manchester.
Page 1 Printing & Terminal Services Lecture 8 Hassan Shuja 11/16/2004.
Agenda Positional Parameters / Continued... Command Substitution Bourne Shell / Bash Shell / Korn Shell Mathematical Expressions Bourne Shell / Bash Shell.
Trinity College Dublin, The University of Dublin GE3M25: Computer Programming for Biologists Python Karsten Hokamp, PhD Genetics TCD, 03/11/2015.
Agenda for Class 2/20/2014 Introduce Microsoft’s SQL Server database management system. Use the lab to discuss how to CREATE, DROP and populate (INSERT)
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
Chapter 27 Getting “Web-ified” (Web Applications) Clearly Visual Basic: Programming with Visual Basic nd Edition.
Microsoft Visual C# 2010 Fourth Edition Chapter 3 Using GUI Objects and the Visual Studio IDE.
Page ADP PearsonAccess Proctor Training. Page Agenda Test Overview Testing Components Proctor Roles and Responsibilities Overview Administering the Test.
IST 210: PHP Basics IST 210: Organization of Data IST2101.
Fixing Windows 10 Automatic Updates Install Problem
Chapter Objectives In this chapter, you will learn:
Lesson 7: Preparing the Slide Show
SQL and SQL*Plus Interaction
Bomgar Remote support software
Customization
WEB PROGRAMMING JavaScript.
Computer Science Projects Database Theory / Prototypes
Presentation transcript:

Command-line control of Terminal Services Christa Anderson

Today’s event will run one-hour long. Here are the expected times for each segment of the Webcast: :00 – :05: Moderator introduces the speaker and discusses the details of the Webcast. :05- :25: Speaker delivers a PowerPoint presentation on the Webcast topic. :25- :35: Moderator and speaker engage in a brief Q&A on the topic :35- :60: The speaker responds to questions submitted by the audience. You can submit questions to the speaker at any time during the event. Just click on the “Ask a Question” button in the lower left corner of your screen. Webcast Schedule

Technical FAQs Q: Why can’t I hear the audio part of the webcast? A: Try increasing the volume on your computer. Q: I just entered the webcast and do not see the slide that the speaker is referring to. What should I do? A: The slides are constantly be pushed to your screen. You’ll should refresh (hit F5) to view the latest slide. Q: What time zone do the webcasts take place? A: The TechTarget webcasts all occur on Eastern Daylight Saving Time (UTC/GMT - 4 hours). Q. I can’t view some of the detail on the slides. How do I enlarge the slides for a better view? A: Click the “Enlarge slide” link in the upper right corner of your presentation. This will open a new browser with a full view of the current slide. You can also visit the Broadcast Help page for more information or to test your browser compatibility. Click here: You can also visit the Broadcast Help page for more information or to test your browser compatibility. Click here:

Agenda  Why is command-line editing useful?  What tools are available for command- line editing?  Using TSCMD.EXE for simple configuration  Using WMI and VBScript for more advanced configuration

Why Command-Line Editing?  Editing settings from the GUI is time- consuming on more than a few servers  Command-line edits can be scripted and are therefore more consistent.  Command-line edits don’t need to be done either at the console or by using a TSCAL to connect to the terminal server to be edited

What Tools Are Available?  Command-line configuration tools in Terminal Services  TSCMD.EXE  The new WMI provider for Terminal Services

Using TSCMD  Command-line support for common Terminal Services settings, based on a WTS API  Requires Windows 2000 or later on client and server  Edit the settings on the server where the settings are stored (e.g., domain controller)  Basic TSCMD syntax: tscmd [New Value]

Using TSCMD.EXE  Works across the network  Point it to the terminal server and user account you need to configure  Returns net error messages, so if you get an error run net help to troubleshoot  Settings take place immediately for the next user session—no need to reboot.  To make TSCMD.EXE report existing settings, run the command with no new value

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

Disabling User Access tscmd sandworm scott allowlogonterminalserver 0

Editing Remote Control Settings tscmd sandworm scott shadowingsettings 1

Configuring Printer Settings tscmd sandworm scott deviceclientprinters 1 tscmd sandworm scott deviceclientdefaultprinter 1

Configuring Timeouts and Reconnects tscmd sandworm scott timeoutconnection 100 tscmd sandworm scott timeoutdisconnect 200 tscmd sandworm scott timeoutidle 120

Starting a Program in the Session tscmd sandworm scott initialprogram “wordpad.exe" tscmd sandworm scott workingdirectory c: tscmd sandworm scott inheritinitialprogram 0

Limitations to TSCMD.EXE  Functions on a per-user and per-server basis only  Not all settings exposed through this API  Requires the person running the command to be an administrator  Very limited error reporting  No built-in event logging

Using VBScript to Edit Settings  The Windows Scripting Host allows you to run VBScript from within the operating system  Windows Server 2003 has a new WMI provider that allows you to edit settings programmatically, using VBScript

What can VBScript Do that TSCMD can’t?  Here’s a short list:  Configure color depth for the session  Adjust mandatory encryption settings  Define the session directory location  Configure Time Zone redirection  Disadvantage: it takes longer to learn. Knowing TSCMD can be helpful for learning some values edited through WMI

Parts of a Script  Actions you can take  Things you can act on  Statements defining the conditions under which you’ll take those actions

Data Types  Numbers  Strings  Date/Time data  Boolean values

Variables and Constants  Both have assigned values—user input, object properties, or calculations from another part of the script  Variable values may change in the course of the script  Constant values do not change

Arrays  Groups of variables, as many as you like when you define the array  Array sizes may be static or dynamic  Can contain any data type: numbers, strings, date/time information, etc.  Find data by its index number (beginning with 0)  Arrays may have more than one index, but more than two gets confusing

Built-in Functions  Combined sets of instructions for doing things that are hard to do with the operators supported in VBScript  Several different kinds  String functions  Date and time functions  Array functions  Working-with data types functions  Mathematical functions  Other functions (InputBox, MsgBox)

String Functions  Character/ANSI conversion and checking  String Size  String Editing  Replacing text in a string

Date and Time Functions  Returning date and time information  Converting string data to a date/time  Returning and computing the date and time

Numeric Functions  General mathematical functions  Rounding functions  Random number generators

Array Functions  Join merges arrays  Split divides arrays

Functions for Working with Data  Determining data type  Conversion functions  Formatting

Other Functions  Input and output boxes  Error handling/notification  Determining engine version

Statements  If… Then  Select Case  Do… Loop  For… Next

Basics of WMI  WMI exposes underlying parts of the operating system to scripting languages such as VBScript. If a part is exposed, it’s said to have a provider.  You cannot access settings without a provider.  To edit a setting on a remote computer, that computer must support WMI and must have the provider the script refers to.

Terminal Services Support in WMI  The provider exposes TS-specific structures, including:  Sessions  Session environments  Remote control settings  Logon settings  To edit the settings, you enumerate the instances of these objects on the selected server

ADSI Objects  To get to the servers, you’ll often use ADSI  Any object found in a directory structure  User accounts, organizational units, domains, printers  Uses same property and method structure as WMI or file system objects  Not limited to Active Directory—works also for SAM and NDS—but namespace and syntax varies with the type of information you need

Key ASDI Functions and Methods  GetObject function connects to an object so you can access its properties and methods  GetInfo queries the directory structure and repopulates the local cache  Put sets a property in the local cache  SetInfo writes the cached value to the original object

Running a Script on Multiple Servers  Connect to the OU in which all terminal servers reside and run the script on all members of that OU  Store the names of all terminal servers in a file and input that file into the script  Accept server names as arguments to the script

Scripting Tips  Keep the lines in scripts short  Comment liberally  Mix case in your code to enhance readability  Use the WSH command-line environment  Name variables and constants according to data type  Explicitly define variables  Write scripts in a text editor

Summary  Use command-line tools to edit terminal settings more quickly and consistently  TSCMD.EXE for basic configuration  VBScript and WMI for more complex settings (Windows Server 2003 only)

Need More Information?  TSCMD.EXE is a free download from  Brief user guide to TSCMD.EXE at  My “Scripting Solutions” column in Windows and.NET Magazine offers step-by-step explanations of VBScript, WMI, and ADSI  Check out Microsoft’s script center at fault.asp?url=/technet/scriptcenter/default.asp