Solved

Script to Automate a Remote Desktop connection with Username and Password

Posted on 2011-02-21
8
2,872 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 70

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 70

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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Suggested Solutions

by Batuhan Cetin In this article I will be guiding through the process of removing a failed DC metadata from Active Directory (hereafter, AD) using the ntdsutil tool in a Windows Server 2003 environment. These steps are not necessary in a Win…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

751 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