Change RDP Listening Port from command Line

Hi.
I want to change the RDP Listening port on a number  of Windows XP Pro PC's from the command line. I know the key to be changed is:-HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-TCP\PortNumber but need to use one of the registry edititing utilities such as Regfind or regini. Have tried but cannot figure out the exact syntax. Any help appreciated...
ChrissycanAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Pete LongTechnical ConsultantCommented:
Hello Chrissycan,



export the registry key to a .reg file put it in a server share

regedit /s \\servername\sharename\new.reg



Regards,

PeteLong
0
arshanaCommented:
Windows XP comes inbuilt with a command line based registry editor called reg.exe . Using it you can modify add or remove entries from registry . For details visit http://www.petri.co.il/reg_command_in_windows_xp.htm if you still need help reply back.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
arshanaCommented:
REG ADD HKLM\system\CurrentControlSet\Control\TerminalServer\winstations\rdp-tcp /v PortNumber /t REG_DWORD /d 0xd3e
0
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

ChrissycanAuthor Commented:
Thanks both...
Arshama I think your answer is simple and what I am looking for but when I run it I get an error saying "to many command line parameters". Also I think I need a space between "Terminal" and "Server".  Any further ideas?.
0
arshanaCommented:
You are getting the  error because you are using the space. You dont have to use the space between the Terminal Server
0
ChrissycanAuthor Commented:
Thanks again...
If I leave the space out it creates another key "TerminalServer" at the same level as "Terminal Server".

0
Henrik JohanssonSystems engineerCommented:
It shall be spaced, but you nead to place quotes around the spaced parameter.

reg add "HKLM\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v PortNumber /t REG_DWORD /d 0xd3e 

Open in new window

0
ChrissycanAuthor Commented:
Thats it working...Thanks to all...Hope the points have been awarded fairly...
0
Pete LongTechnical ConsultantCommented:
ThanQ
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows XP

From novice to tech pro — start learning today.