Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Contact
  • Reviews
  • Toggle search form
Home » Windows » Connect to the Remote Desktop Console from Command Prompt
  • msinfo32 thumbnail
    How to use MSINFO32 to view System Information Windows
  • Windows 10 Upgrade 1 1
    Perform an in-place upgrade from Windows Server 2016 to Windows Server 2019 Windows Server
  • FimageUbuntuUpgrade
    How to Upgrade From Ubuntu 20.04 LTS to 22.04 LTS Linux
  • sandboxx
    Use Windows Sandbox as a security feature Virtualization
  • SQL EvaluationExpired
    Windows could not start the SQL Server service on local computer 17051: A network-related or instance-specific error occurred while establishing a connection to SQL Server Oracle/MSSQL/MySQL
  • ad
    Service and Network Port requirements for Active Directory Windows
  • 785509289 780x439
    Integrate Pleasant Password Server with Active Directory Password Manager
  • jooblejobs
    Find your dream job with Jooble JIRA|Confluence|Apps

Connect to the Remote Desktop Console from Command Prompt

Posted on 21/12/202224/10/2024 Christian By Christian No Comments on Connect to the Remote Desktop Console from Command Prompt
Remote-Desktop-Connection

In this article, you will learn about how to Connect to the Remote Desktop Console from Command Prompt. Remote Desktop Protocol is a proprietary protocol developed by Microsoft which provides a user with a graphical interface to connect to another computer over a network connection. Please see How to allow saved credentials for RDP connection, how to Disable credential Prompts for Remote Desktop Connections, and “Remote Desktop cannot find the computer this in the specified network: Verify the computer name and domain that you are trying to connect“.

Most of us are administrators and we use this technology on a daily basis. Therefore, it isn’t new to us. Here is a guide discussing all you need to know about the Kerberos delegation. 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 your Remote Desktop Server or Session Host (RDSH) as if you were directly connected. The mstsc command is used from within the Windows command line.

You can type MSTSC directly into the search box on Windows 10 or from the Run dialogue box. You can also use the MSTSC command directly from the command line as well.  images below show what is obtainable and how to connect via the command line.

image-44
image-43

There are a few different switches that you can use. I have described this topic extensively in this guide “how to protect Remote Desktop credentials with Windows Defender Remote Credential Guard or Restricted Admin Mode“. We will discuss all the various options available. 

Connect to Remote Desktop Console Session via the 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 /?
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]]

Please see the following guides: How to remove saved RDP credentials entries in Windows 10, how to remove entries histories from the Remote Desktop Connection, and how to prevent the saving of Remote Desktop Credentials in Windows. In place of an RDP client, you can also use AnyDesk!

Available MSTSC Command Line Arguments

The following are the available command line arguments:

SwitchesDescription
<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.

How to connect to the console session using RDP

This command will connect you to the console session on a server rather than starting a new session.

mstsc / console
image-45

Command to open Remote Desktop in full-screen mode

Starts Remote Desktop Connection in full-screen mode. Add /f switch to the command. Input mstsc/f and then press the Enter key.

After that, input the IP address, and click on Connect. Finally, type in the credentials of the remote PC and then you can connect successfully.

mstsc /f
mstsc /v:computername

To connect to the console session of the remote machine. The “address” field should be replaced with the address of the remote machine. The program launched is also known as Microsoft Terminal Server Connection.

Once you launch the mstsc program with the correct address and switches as indicated above, you will be able to login with the desired account. This will be the account’s console session.

mstsc /console /V:address

Note: You can use RDP to remotely connect to the console session of the device with the /admin switch as shown below. A console session is either when you’re at the computer’s physical console or a remote connection that’s the same as if you’re at the computer’s physical console.

mstsc.exe /admin /v:

I have described a useful use case in this guide “MBAM Frequent Report Errors: Understanding Microsoft BitLocker Administration and Monitoring compliance state and error status“.

I hope you found this blog post on how to Connect to the Remote Desktop Console from Command Prompt helpful. If you have any questions, please let me know in the comment session.

5/5 - (1 vote)

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
Windows, Windows Server Tags:Microsoft Windows, Remote Access, Remote Desktop, Remote Desktop Protocol, Remote Desktop Services, RemoteConnection, Windows 10, Windows Server 2016

Post navigation

Previous Post: Protect Remote Desktop credentials with Windows Defender Remote Credential Guard or Restricted Admin Mode
Next Post: How to install Cypress on Windows and perform Automation

Related Posts

  • linkyourandriodtoyourpc
    Microsoft Phone Link: Connect Android to Windows 11 Windows
  • windows 10 creators update wallpaper 1
    How to locate and edit the host file on Windows Windows Server
  • screenshot 2020 03 13 at 20.24.17
    How to install Cygwin packages from the command line Windows Server
  • How to Fix Application Error (0xc0000135) in Windows
    Fix the application was unable to start correctly (0xc0000135) error Windows
  • Uninstall MicrosoftDefenderUpdate
    Remove Microsoft Defender Update on Windows 10 & Server Windows
  • Perform an in place upgrade of Windows Server
    In-place upgrade of Windows Server 2022 to 2025 Backup

More Related Articles

linkyourandriodtoyourpc Microsoft Phone Link: Connect Android to Windows 11 Windows
windows 10 creators update wallpaper 1 How to locate and edit the host file on Windows Windows Server
screenshot 2020 03 13 at 20.24.17 How to install Cygwin packages from the command line Windows Server
How to Fix Application Error (0xc0000135) in Windows Fix the application was unable to start correctly (0xc0000135) error Windows
Uninstall MicrosoftDefenderUpdate Remove Microsoft Defender Update on Windows 10 & Server Windows
Perform an in place upgrade of Windows Server In-place upgrade of Windows Server 2022 to 2025 Backup

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a
 
  • msinfo32 thumbnail
    How to use MSINFO32 to view System Information Windows
  • Windows 10 Upgrade 1 1
    Perform an in-place upgrade from Windows Server 2016 to Windows Server 2019 Windows Server
  • FimageUbuntuUpgrade
    How to Upgrade From Ubuntu 20.04 LTS to 22.04 LTS Linux
  • sandboxx
    Use Windows Sandbox as a security feature Virtualization
  • SQL EvaluationExpired
    Windows could not start the SQL Server service on local computer 17051: A network-related or instance-specific error occurred while establishing a connection to SQL Server Oracle/MSSQL/MySQL
  • ad
    Service and Network Port requirements for Active Directory Windows
  • 785509289 780x439
    Integrate Pleasant Password Server with Active Directory Password Manager
  • jooblejobs
    Find your dream job with Jooble JIRA|Confluence|Apps

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,841 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.