Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

From a remote machine, is there an easy way to log into windows? Maybe using psexec.exe or mstsc.exe? This would be lauched by a script.

I know the username and password. I only need this to work on Windows 7 and on 2008 R2.

share|improve this question
    
What's the objective? –  Chris_K Oct 11 '11 at 4:07
    
To expand on Chris_K's comment, the phrase "log into" is ambiguous in this context. You need to explain what you want to happen. –  Harry Johnston Oct 11 '11 at 4:21
    
I want the same thing that would happen if I connected to the machine, pressed Ctrl-Alt-Del and entered my username and password to log into windows as that user. –  warpni Oct 11 '11 at 4:29
    
Given that you already name mstsc.exe - what the heck do you want to know? How to START mstsc? How to log into the other machine without it having remote desktop enabled? I dont see anything left after starting mstsc.exe that you already know. –  TomTom Oct 11 '11 at 6:43
    
You can save Remote Desktop settings into an .rdp file and then open it from the command line. Type mstsc -? for the command-line syntax. –  Harry Johnston Oct 11 '11 at 7:29
show 1 more comment

2 Answers

Take a look at Remote Desktop Protocol (RDP). Microsoft currently refers to their official RDP server software as Remote Desktop Services, formerly "Terminal Services". Their official client software is currently referred to as Remote Desktop Connection, formerly "Terminal Services Client".

You will need to enable the service on the target, but after that, you should be good to go.

share|improve this answer
add comment

If you want "the same thing" as an interactive logon, you would need to do an interactive logon. mstsc would require you to enter the username and password, but you could simply save the credentials for the given context of your script.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.