-1

i need to login to multiple windows servers. can anyone post me a Windows bat file sample for remote login instead of invoking mstsc and typing user id and password?

user1169877
  • 19
  • 1
  • 1
  • 1

3 Answers3

0

Input the following into a batch file. Tested and it works for Windows 7

mstsc.exe /v:(IP-Address-of-Server)

E.g. mstsc.exe /v:192.168.1.2

madth3
  • 7,275
  • 12
  • 50
  • 74
0

Did you even attempt to look for an answer before asking the question? I already know the answer to my question.

I did a search on google for mstsc command line options

and came up with Use command line parameters with Remote Desktop Connection

Erik Philips
  • 53,428
  • 11
  • 128
  • 150
  • sorry, i got the answer from http://www.windowsnetworking.com/articles_tutorials/Configuring-Windows-Remote-Desktop-command-line.html after i posted this qn.. thanks – user1169877 Jan 25 '12 at 19:32
  • 1
    updated doc: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/mstsc – Andrzej Martyna Oct 28 '20 at 10:11
0

Try this and put it is a batch file:

@echo off
title Connect to server . . . .
set /p SERVER=Please enter the server name: 
title Connecting to server %SERVER%
mstsc.exe /v: <Your server name:port>
ronalchn
  • 12,225
  • 10
  • 51
  • 61
Mesologie
  • 1
  • 1