Skip to main content
Image
mstsc-commands-alternatives-hero

Easy Guide to MSTSC Command Lines

Image
alex-hunter
October 5, 2020

Text

Remote Desktop has been used for a long time as an important feature of Windows. Microsoft Terminal Services Client (MSTSC) is the command line interface to run the Microsoft Remote Desktop (RDP) client. It enables you to establish a remote connection to somebody else’s computer or to Remote Desktop Session Host (RDSH) servers as if it is in front of you and edit existing Remote Desktop Connection (.rdp) configuration files. The mstsc command is used from within the Windows command line.

MSTSC Commands

The MSTSC command arguments used by an average user are /v and /f. You can use the command to set up the connection in seconds if the remote computer is in the same network or if you know the Internet Protocol (IP) address of the remote computer.

The syntax of MSTSC is:

MSTSC [<connection file>] [/v:<server[:port]>] [/g:<gateway>]
[/admin] [/f[ullscreen]] [/w:<width> /h:<height>] [/public] |
[/span] [/multimon] [/edit "connection file"] [/restrictedAdmin]
[/remoteGuard] [/prompt] [/shadow:<sessionID> [/control][/noConsentPrompt]]

The following are the available command line arguments:

<connectionfile>The name of the .rdp file required for establishing the connection.
/v:<server[:port]>The remote computer or server where you want to connect.
/g:<gateway>The RD Gateway Server to be used for the connection. Required only if the endpoint remote PC is specified with /v.
/adminTo establish the connection as an admin.
/fTo view the Remote Desktop Window in full screen.
/w:<width>To specify the width of the Remote Desktop Window.
/h:<height>To specify the height of the Remote Desktop Window.
/publicTo run the Remote Desktop Connection publicly.
/spanTo match the width and height of the Remote Desktop with the local desktop.
/edit <connectionfile>To edit the specified .rdp file.
/multimonTo make the monitor layout of the Remote Desktop Services session identical to the client-side configuration.
/restrictedAdminTo connect to the remote PC in the Restricted Administration mode. The credentials are not sent to the remote PC in this mode, protecting you if you connect to a compromised PC.
/remoteGuardTo connect your device to a remote device using the Remote Guard, which prevents sending credentials to a remote PC.
/promptTo prompt you to put in credentials to connect to the remote PC.
/shadow:<sessionID>The ID of the session to be shadowed.
/controlTo allow the control of the session when shadowing.
/noConsentPromptTo allow shadowing without user consent.
/migrateTo migrate legacy connection files created with Client Connection Manager to new .rdp connection files.
/?To display help in the command prompt.

Examples of MSTSC command parameters:

  1. mstsc /v:192.178.122.20

    Connects to host 192.178.122.20 on the rdp standard port.

  2. mstsc /w:1024 /h:800 /v:192.178.122.20

    Connects to host 192.178.122.20 on the rdp standard port with a window of width 1024 and height of 800.

  3. mstsc /edit hostconnection.rdp

    Opens the rdp configuration file hostconnection.rdp for editing.

Parallels Client for Windows Has Additional Features compared to MSTSC

While MSTSC has been used for a long time to establish remote connections, it is safe to state that Parallels® client for Windows is a better alternative to MSTSC. Parallels Client is easy to install and provides instant, secure access to the Parallels Remote Application Server (RAS) farms from any client (Windows, iOS, Linux, Mac, Chromebook, Thin Client and more). It leverages RDP technology and allows users to work simultaneously on applications and desktops.

Parallels Client offers additional functionalities that are otherwise not supported by Microsoft RDP client such as drag and drop, zoom, multiscreen support, etc. to ensure a better user experience.

Additionally, Parallels Client also offers additional command line parameters for launching published applications and desktops from the command line. The following are the available command line parameters:

s!=’primary server’Primary Server hostname or IP address.
b!=’backup server’Secondary Server hostname or IP address.
a!=’application/desktop id’Published Application/Desktop ID.
p!=’override application params’ 
t!=’port’“Port of the RAS Remote Application
Server connection. “ 
u!=’usernameUsername for the user to connect with.
q!=’password’Password for the user.
“d!=’domain’ ignored if user name 
is in UPN format “Domain name.
!=’0/1′ 0 use primary server, 1 user backup serverSpecify value in order to connect either to the primary or backup server.
“m!=’connection mode’ (gateway mode = 0, direct 
mode 1, gateway ssl mode = 2, direct ssl = 3, 
direct rdp=4) “Specify value for the connection mode.
o!=’0/1′ if set to 1 credentials are overwritten with SSO information if availableWhen set to 1, credentials are overwritten with SSO credentials.
i!=’connection alias’Specify a connection Alias.
c!Always ask for credentials.
r!Reconnect if the connection is dropped.

Download the Parallels Client as an MSTSC command alternative today!