How To Start Remote Desktop Service Through Command Prompt
Introduction
If you are interested in using Windows Remote Desktop from the control line, probable you already know what it does merely y'all may not take realized all that you tin exercise with it. Windows Remote Desktop allows you to remotely control merely about whatever windows PC or Server. Y'all can perform remote control from PC to PC, Server to Server, PC to Server, or Server to PC. The server component of RDP is congenital into the Windows Operating Organisation whether it is XP, Vista, or Windows 7 (but yous must authorize remote desktop to that figurer). On the desktop side, that connection to the PC is limited to a single connection where you lot remote command the console. However, on the server side, in say Windows 2003 or 2008, y'all can enable multiple users to connect to the server with Terminal Services.
However, no affair whether yous are using a desktop or server Bone, the client piece of software is the same – the Remote Desktop Connection or Remote Desktop Customer, equally I similar to call it. The executable for the Remote Desktop Connexion is called mstsc.exe and it's located in %systemroot%/system32/mstsc.exe.
Permit usa learn all that you can exercise with mstsc.exe…
Running Windows remote Desktop Connection from the CLI
In Chris Sander's WindowsNetworking.com Admin Tip – Using the Remote Desktop Client from the Command Prompt – he covers the quick command line how-to of Windows Remote Desktop. As Chris points out, the basic command syntax for mstsc.exe is:
mstsc.exe {ConnectionFile | /v:ServerName[:Port]} [/console] [/f] [/w:Width/h:Summit]
Yet, if in Vista, you run mstsc /?, you will run across that there are more options for it:
Effigy 1: Remote Desktop Connectedness Usage Help Screen
On nearly computers I walk up to and utilise, the remote desktop connexion is not easily locatable in the Start Menu. Because of this, I have gotten used to starting Remote Desktop past going to Start -> Run and and so just typing mstsc and pressing Enter.
This way I practice not spend any time navigating the Programs menu.
Mutual reasons to run mstsc from the CLI
I love Remote Desktop considering from my laptop or desktop organisation, I tin connect to any of my PCs or servers in my infrastructure. It is very "empowering".
I often demand to use the command line options. One mutual thing to do is to save a RDP File, which is a saved configuration file for a particular RDP connectedness – or really a detail server or PC that you normally connect to. Of grade, yous could even have multiple RDP files for the same server or PC if you desire to accept multiple saved configuration files.
These ".rdp" files are simply unproblematic text files that yous tin can create or edit with notepad. Here is a await at i:
Figure 2: RDP file opened in notepad
While y'all can practise this with notepad, the virtually common fashion to edit a .RDP file is to use the GUI Remote Desktop client because it offers options to Open, Save, and Relieve as connection files, like this:
Effigy 3: Opening and Saving RDP Connection Settings
I tin can too edit a particular file using the GUI but initiate it from the control line with the /edit pick for mstsc, similar this:
mstsc /edit examination.rdp
Some common reasons that I would save RDP files for later on use are:
- Have salvage connections to multiple servers and put those saved settings on my desktop or in the folder in the Commencement menu, like this:
Figure iv: Creating multiple RDP server connections in the Start Manu
- Accept multiple versions of the aforementioned connectedness – perhaps I connect to a virtual desktop using VDI and I have one icon that creates a total screen RDP connection and one that creates an 800×600 resolution connection
- Perhaps I have one RDP file that connects to a server and another RDP file that connects to a server and runs an application (which can be specified in the .rdp file)
Creating a Desktop Shortcut to run Remote Desktop
Let usa say that you wanted to create a desktop shortcut to connect to a particular server. Y'all could either use the base set up of command line options or you could use those options and a .rdp connection file.
Either style, you demand to be able to enter the full command line into the desktop shortcut creation wizard.
Let us say y'all desire to create a desktop shortcut to:
- Connect to server "exchange"
- Connect to the console of that server
- Create an 800×600 window
To do this you would run:
mstsc.exe /5:commutation /admin /w:800 /h:600
And to create a desktop shortcut, you would enter this into the create shortcut location, like this:
Figure 5: Creating a desktop shortcut with RDP
Even so, if those bones options are non enough, y'all need to utilise a .rdp connection file.
To do this, merely run mstsc.exe, get in and customize your connexion all that you want. Add sound, customize the bandwidth, set an awarding to be run, tweak the performance, connect local devices & resources like printers and the clipboard. When you lot are done, only click the Relieve as push button on the Full general tab under connection settings. When you lot salvage it, give it a name like fileserver. Make sure that you lot know what folder your RDP file was saved in. I besides recommend testing your connection hither to ensure that it works as expected.
Once saved, yous can close out the Remote Desktop Connexion window and then go to create your desktop shortcut. When you enter the desktop shortcut location, you will enter the connection file after msctsc.exe. Make sure that you enter the total path to the .rdp file. The .rdp file needs to exist in your path, or your desktop shortcut and .rdp file should be in the same binder. Thus, it would look something similar:
Mstsc.exe c:\users\david\documents\exchange.rdp
OR, if you lot are all going to run mstsc with a connexion file, you do not demand to create a desktop shortcut at all. All you lot take to practice is to save the RDP connection settings file and then run it. The file itself, when run, is associated with mstsc.exe so it will be run and your connection will automatically initiate to the server specified in the connection file.
Ane final tip – if you want to alter the defaults that mstsc uses to connect when yous run it without any customizations, you tin can edit the Default.rdp file in your home documents folder.
Summary
Windows Remote Desktop is an amazingly powerful tool and it is hard to imagine life without it. While information technology is easy to connect to a server using the RDP GUI, once you use RDP a few times, you volition want to do much more with it. Using command line options with mstsc.exe and creating desktop shortcuts to connect to particular servers is the next step that you lot demand to make.
You can notice more than information nigh Remote Desktop at the post-obit links
- Microsoft TechNet – Mstsc command line options
- Microsoft: Remote Desktop Connection (Final Services Client 6.0)
- Windows Networking.com – Troubleshooting Remote Desktop
How To Start Remote Desktop Service Through Command Prompt,
Source: https://techgenix.com/Configuring-Windows-Remote-Desktop-command-line/
Posted by: bennettandenderew.blogspot.com

0 Response to "How To Start Remote Desktop Service Through Command Prompt"
Post a Comment