Solved

Script to Automate a Remote Desktop connection with Username and Password

Posted on 2011-02-21
8
2,182 Views
Last Modified: 2012-05-11
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
Comment
Question by:habbotha
8 Comments
 
LVL 39

Accepted Solution

by:
Krzysztof Pytko earned 200 total points
ID: 34941752
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
 
LVL 3

Expert Comment

by:Patricck
ID: 34941759
0
 
LVL 9

Assisted Solution

by:Tomas Valenta
Tomas Valenta earned 150 total points
ID: 34941776
Try using this tool, maybe helps you better then script.
http://terminals.codeplex.com/
0
[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

 
LVL 68

Assisted Solution

by:Qlemo
Qlemo earned 150 total points
ID: 34941860
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
 

Expert Comment

by:PachoVilla
ID: 34942165
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
 
LVL 68

Expert Comment

by:Qlemo
ID: 35886218
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

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now