Does anyone know how to query registry to get RDP listening port of remote server via VBscript

Hi ,

Does anyone know how to query registry to get RDP listening port of remote server via VBscript and also to get rdp status of remote servers ?

Note : Required Vbscript as this has to be run on 2003/2000/2008 servers

September 13th, 2015 3:09am

reg query /?

runs on all versions of Windows.

You can look up the registry key for each machine on the Internet with your favorite search engine.

The port is always 3389.  You can test the post with PortQry or with telnet.

What is it that you are calling "rdp status".  RDP is a protocol.  You can query the service to see if it is running and you can query the event log for errors.  You cannot query RDP.

You can use query to get the status:

QUERY TERMSERVER /?

Free Windows Admin Tool Kit Click here and download it now
September 13th, 2015 3:34am

The vbscript should capture remote server RDP listening port to the reprt
September 13th, 2015 3:50am

We do not write customs scripts.

You can look for scripts here: https://gallery.technet.microsoft.com/scriptcenter/site/search?f%5B0%5D.Type=RootCategory&f%5B0%5D.Value=remotedesktopservices&f%5B0%5D.Text=Remote%20Desktop%20Services

You can post a request here at the bottom of the page: https://gallery.technet.microsoft.com/scriptcenter/site/requests

Free Windows Admin Tool Kit Click here and download it now
September 13th, 2015 4:23am

The port is always 3389.  You can test the port with PortQry or with telnet.

The Remote Desktop port is 3389 by default. It can be set to any other value here:
HKLM\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber

September 13th, 2015 4:52am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics