Mstsc



Mstsc

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. Oct 16, 2017 Reference article for the mstsc command, which creates connections to Remote Desktop Session Host servers or other remote computers, edits an existing Remote Desktop Connection (.rdp) configuration file, and migrates legacy connection files that were created with Client Connection Manager to new.rdp connection files.

Connect and login to a remote machine using the Remote Desktop Protocol (RDP) also known as Terminal Server Connection (TSC).

To connect to a remote computer the user account must be a member of the local group 'Remote Desktop users' on the remote server (either directly or inherited via a global group) in addition the user account needs the privilege SeRemoteInteractiveLogonRight (allow logon through RDP/Terminal Services.)

Mstsc
  • MSTSC is a command used in Windows to run Remote Desktop (RDP). Remote Desktop enables you to connect to someone else’s computer and use it as if you were standing next to it. As an IT tech, this.
  • Do you have a computer with High-DPI screen? A very high resolution display? And is everything too small to see within your Remote Desktop Connection, try this solution… This issue is caused by lack of not being DPI scaling aware of the Remote Desktop Client.
  • MSTSC, a command within Windows, is used to run remote desktop. Hence, you can also refer to the MSTSC as a remote desktop command. When you are on the same network or know the IP address of a remote computer, you are able to utilize MSTSC to establish the connection.
Mstsc-f

The command CMDKEY can be used to setup/save the password credentials used by Remote Desktop.

Shortcut Keys

Shortcut keys that can be used when connected to a Remote Desktop:

Windows ShortcutRemote DesktopDescription
Ctrl+ALT+DelCtrl+ALT+ENDBring up the Windows Security dialog box.
ALT+TABALT+Page UpSwitch between programs from left to right.
ALT+Shift+TABALT+Page DownSwitch between programs from right to left.
ALT+Esc
ALT+Shift+Esc
ALT+INSERTSwitch between programs in the order they were started.
Ctrl+EscALT+HOMEDisplay the Start menu.
n/aCtrl+ALT+BREAKSwitch the client between full-screen mode and window mode.
ALT+Space Bar ALT+DeleteDisplays the remote window's Control menu
ALT+Print ScreenCtrl+ALT+NumPad MINUS Place an image of active window onto the Terminal Services clipboard.
Print ScreenCtrl+ALT+NumPad PLUS Place an image of the entire TS client on the Terminal Services clipboard.
This is almost the same as pressing ALT+Print Screen to capute the window locally but removes the Windows chrome and so shows more of the remote window.

If the RDP shortcut keys don't work - this is dependent on your RDP options/settings.
The window may need to be full screen to accept shortcut keys.

All the RDP connection settings can be saved to a .rdp file, which you can then run from a shortcut:

The default settings are saved in default.rdp, you can also edit the .rdp file, the settings while scarcely documented all in plain text.

Examples:

MSTSC /v:MyServer /f /admin
MSTSC /v:127.0.0.1 /w:1024 /h:768
MSTSC /v:MyServer /w:800 /h:600
MSTSC /edit filename.rdp

Windows 10 Remote Desktop Connection Manager

Error: 'Your credentials did not work'

This error can have several causes:

If using a domain account, prefix with the domain name: SS64domuser64
If the account is a non-administrator, you may need to grant logon rights as described above.
If the password contains any special characters: $,/, Tabs etc then copy and paste of the password to an RDP session may not work.
Specific problems: copy/paste will convert TABs into spaces and double $$'s are removed (e.g. Pa$$word1)

“Ignorance is preferable to error; and he is less remote from the truth who believes nothing, than he who believes what is wrong” - Thomas Jefferson

Mstsc Port

Related commands:

Remote Desktop Connection Manager - RDP to multiple machines.
Q216783 - Keep-Alive Disconnected TS Connections
Q2726399 - Cannot change the DPI setting through an RDP session.
MAPISEND - Send email from the command line.
RMTSHARE - Share a folder or printer.
SHORTCUT - Create a windows shortcut.
SHADOW - Monitor/View another users running RDP session.
SHUTDOWN - Shutdown the computer/Log off a user.
TSDISCON - Disconnect a Remote Desktop Session.
VMConnect - Connect to a Hyper-V Virtual Machine.
Remote Desktop Services Shortcut Keys - Microsoft.
Equivalent bash command (Linux): VNCconnect or screen

Copyright © 1999-2021 SS64.com
Some rights reserved
-->

Applies to: Windows Server (Semi-Annual Channel), Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Creates connections to Remote Desktop Session Host servers or other remote computers, edits an existing Remote Desktop Connection (.rdp) configuration file, and migrates legacy connection files that were created with Client Connection Manager to new .rdp connection files.

Syntax

Connect To Rdp Command Line

Parameters

ParameterDescription
<connectionfile>Specifies the name of an .rdp file for the connection.
/v:<server>[:<port>]Specifies the remote computer and, optionally, the port number to which you want to connect.
/adminConnects you to a session for administering the server.
/fStarts Remote Desktop Connection in full-screen mode.
/w:<width>Specifies the width of the Remote Desktop window.
/h:<height>Specifies the height of the Remote Desktop window.
/publicRuns Remote Desktop in public mode. In public mode, passwords and bitmaps aren't cached.
/spanMatches the Remote Desktop width and height with the local virtual desktop, spanning across multiple monitors if necessary.
/edit <connectionfile>Opens the specified .rdp file for editing.
/migrateMigrates legacy connection files that were created with Client Connection Manager to new .rdp connection files.
/?Displays help at the command prompt.

Mstsc Saved Credentials

Remarks

Mstsc Shadow

  • Default.rdp is stored for each user as a hidden file in the user's Documents folder.

  • User created .rdp files are saved by default in the user's Documents folder, but can be saved anywhere.

  • To span across monitors, the monitors must use the same resolution and must be aligned horizontally (that is, side-by-side). There is currently no support for spanning multiple monitors vertically on the client system.

Examples

To connect to a session in full-screen mode, type:

or

Rdp Console Command

To assign width/height, type:

Mstsc malware

To open a file called filename.rdp for editing, type:

Additional References