Home > Windows Server News > Script reveals which port Terminal Services listens to for incoming connections
Windows Server News:
EMAIL THIS

Script reveals which port Terminal Services listens to for incoming connections

By Christa Anderson, Contributor
05 Oct 2005 | SearchWinComputing.com

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   

For many people, one simple yet frustrating problem is finding out which port Terminal Services is listening to for incoming connections.

The default is 3389, but people edit the default for security reasons (or sometimes merely out of curiosity), then can't remember whether they edited it or not. It matters, because if the clients aren't pointing to the right port when they attempt to connect, the connection will fail -- editing the port will affect future Remote Desktop Procotol packages, but not the ones you distributed before changing the port.

It also matters because no Terminal Services tools display or allow easy access to the listening port. (This may be because a terminal server can have more than one network card and, therefore, could conceivably be listening on two ports that would need to be configured separately. But this lack of easy access to the listening port is still inconvenient.)

Rather than walking around to each terminal server, or even opening the Registry Editor for each terminal server, you can write a script to check the value and display it in decimal (which for most people is easier to read than hex). To work properly, our script needs to read a Registry key; convert the value of that key from hex to decimal; and record the value of the key in the Event Log.


Scripting School: Turning the environment with WshShell

  Introduction
  Contents of WshShell
  Viewing and editing the Registry
  Reading and writing to the Registry
  Recording the change
  Summary

Read Christa's previous columns:
April 2005: Beginner's guide to scripting
May 2005: It's time to increase your scripting expertise
June 2005: Connect users to network resources
July 2005: More on connecting to network resources
August 2005: Find objects with Windows Scripting Host
September 2005: Windows Script Host arguments

ABOUT THE AUTHOR:
Christa Anderson
When Christa Anderson began working with Windows Server operating systems in 1992, she became increasingly interested in finding more efficient and flexible ways of performing routine tasks. Christa has written extensively about administrative scripting and taught technical sessions on the subject at conferences such as Comdex and CeBIT, helping people who had never done any scripting to write their own scripts in half a day. In addition to her interest in scripting Windows management, Christa is an authority on server-based computing and the program manager for Terminal Services licensing in Longhorn. If you have a scripting question for Christa, please e-mail her at scripting@SearchWinSystems.com.


Tags: VIEW ALL TAGS

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Microsoft Windows Scripting Language
Create a script to check integrity of your server's drives
Scripting elevation in Windows Vista with JavaScript
Use Ldifde.exe and Csvde.exe data export tools to create Active Directory objects
Scripting School: Replacing text with regular expressions
Scripting School: Writing a script for an office inventory system
Christa Anderson's Scripting School for Windows administrators
How to automate advanced Windows desktop tasks using scripts and macros
Just the FAQs guide to VB Scripting basics
Scripting School: Find objects with Windows Script Host
Windows scripting for beginners

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Windows Server Management - Virtualization, Consolidation, Clustering
HomeTopicsBlogsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2004 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts