Solved

Script to Automate a Remote Desktop connection with Username and Password

Posted on 2011-02-21
8
2,037 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Join & Write a Comment

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.…
Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

747 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

13 Experts available now in Live!

Get 1:1 Help Now