Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4822
  • Last Modified:

Script to Automate a Remote Desktop connection with Username and Password

Good-day,
I would like to create a script that allows me to automatically logon to a server (via RDC) with the username and password already specified in the script.  Is this possible, if so how?
Thank you
Heather
0
habbotha
Asked:
habbotha
3 Solutions
 
Krzysztof PytkoSenior Active Directory EngineerCommented:
You cannot do that directly from command-line (with user name and password). First, create an RDP file with server name, user and password, save it as RDP file and then you will be able to connect using

mstsc RDPfilename.rdp

Regards,
Krzysztof
0
 
PatricckCommented:
0
 
Tomas ValentaIT ManagerCommented:
Try using this tool, maybe helps you better then script.
http://terminals.codeplex.com/
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
MSTSC does not allow for credentials to be provided on command line. Your options are
(a) to use 3rd-party software, like DameWare
(b) to use the ActiveX control - needs an application written around it.

Creating a .rdp file will allow to provide the username, but no password - that is stored in your local security settings (SAM), and needs to be provided at least once per computer.
0
 
PachoVillaCommented:
Why do you need it to be a script?
Otherwise for auto logon using RDP,
create a new management console,
(Run: mmc)
add the "Remote Desktop" module,
add the machines adress you need including logon info,
(especially handy if you have more machines you want to "auto-logon" to)
0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
Could you tell us please why you accepted only that answer? IMHO the first one from iSeek (http:#a34941752) should be accepted in addition, and optionally mine and/or Tominov's.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now