BAT file for mstsc

11k views Asked by At

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?

3

There are 3 answers

0
inderdev On

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

2
Erik Philips On

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

0
Mesologie On

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>