Connect Remote Desktop With Command Line
Connect more efficiently with remote desktop command line
Connect more efficiently with remote desktop command line
Streamline and simplify responsibilities with a powerful and affordable remote support solution
Streamline and simplify responsibilities with a powerful and affordable remote support solution
Help reduce your response and connection times with a set of remote support tools allowing you to effectively attend to the needs of your business. Command line capabilities can be fast and flexible, and they use low bandwidth. They’re also invaluable if your graphical environment is currently unresponsive.
With DRE, take advantage of command line capabilities for remote support by using the System Shell as a typical Windows CMD prompt tool or a PowerShell tool. With full admin privileges, you can easily run batch files or scripts for a quick and effective remote support solution.
Resolve problems faster without impacting the end-user experience
Resolve problems faster without impacting the end-user experience
Support critical business goals with a suite of tools designed by working security professionals
Support critical business goals with a suite of tools designed by working security professionals
Manage your tickets more effectively with a range of remote capabilities
Manage your tickets more effectively with a range of remote capabilities
Get More on Remote Desktop Command Line
How do I run remote desktop from command line?
The prompt to enable remote desktop from the command line is mstsc. However, using this command on its own repeatedly can cause Remote Desktop Protocol (RDP) sessions to generate multiple (potentially unwanted) instances per user account, which can quickly have a negative effect on remote computers. The way around this is to limit the RDP connection to a locally accessible “console” session, which is done by adding the /console switch to the command:
mstsc /console /V:address
This will open a remote desktop console session via Microsoft Terminal Server Connection to the machine specified in the address field. The /console switch also allows technicians to return to a user session if they already have one running and see what applications are currently running on the server. You can use the command prompt or the Run window to execute mstsc /console.
To learn more about other switches and command line options—such as mstsc /f, which opens sessions in full screen mode—type mstsc /? in the command prompt. You can also open and edit RDP files from the command line by using the mstsc /edit filename.rdp command.
How do I end remote desktop sessions from the command line?
Terminal servers have a maximum number of allowed remote connections, which is why it’s important to have tools allowing technicians to close inactive sessions or connections end users forgot to close. Fortunately, so long as you have the proper privileges for your server, you can see and end active remote desktop connections from the command line.
The first step is to open the command prompt. Then enter net use \\Server_ IP_Address /USER:Your_Username Your_Password (replace Server_ IP_address, Your_Username, and Your_Password accordingly.) This will allow you to access the server without establishing an RDP connection.
Next, enter query session /server:Name (replace Name with the name of the target server), which will provide the session ID. Afterward, enter reset session id /server:Server_IP_Address, replacing only the server’s IP address. This will terminate the active session on the Windows server and allow you to access the machine via RDP connection.
Why is the remote desktop connection command line option helpful?
Using the command line to launch a remote desktop connection allows technicians to connect to remote machines quickly, efficiently, and without additional expenses. Some remote maintenance and administration tasks don’t require a full RDP session and can be completed more easily from the command line. During some RDP sessions, the remote graphic interface can become unresponsive, which is why using the command line sometimes offers a less time-consuming way to access machines remotely.
The command line also provides an efficient method of distributing batch files to remote machines that share setting configurations. Group policy can, for instance, use batch files to call up the mstsc command on startup for machines requiring a connection to a terminal server to function.
How does the remote desktop command line work in Dameware Remote Everywhere?
SolarWinds® Dameware® Remote Everywhere provides a suite of cloud-based remote access tools, including a command line emulator designed to allow technicians to easily and quickly deliver assistance or perform maintenance on Windows servers, other machines, RDP files, and more. This allows you to use the System Shell remote desktop command line in DRE as either a Windows cmd.exe prompt or a PowerShell prompt, both of which allow you to run batch files and scripts and offer full administrative privileges. The System Shell options can be accessed under the Advanced Options menu for Windows connections, and they include the following:
- Restart Shell: This command ends the current shell process and begins a new one.
- CTRL + Break: This command prevents a process from executing inside the System Shell but doesn’t end the shell.
- Clear Output: This command clears the shell’s current output.
- Run Local Batch: This command allows technicians to load scripts from their local device and is compatible with all Windows Scripting Host languages.
These commands can be accessed by clicking End at the bottom of the window for remote connections to machines running Apple operating systems.
Related Features and Tools
Other SolarWinds Remote Tools:
Other Features:
How do I run remote desktop from command line?
The prompt to enable remote desktop from the command line is mstsc. However, using this command on its own repeatedly can cause Remote Desktop Protocol (RDP) sessions to generate multiple (potentially unwanted) instances per user account, which can quickly have a negative effect on remote computers. The way around this is to limit the RDP connection to a locally accessible “console” session, which is done by adding the /console switch to the command:
mstsc /console /V:address
This will open a remote desktop console session via Microsoft Terminal Server Connection to the machine specified in the address field. The /console switch also allows technicians to return to a user session if they already have one running and see what applications are currently running on the server. You can use the command prompt or the Run window to execute mstsc /console.
To learn more about other switches and command line options—such as mstsc /f, which opens sessions in full screen mode—type mstsc /? in the command prompt. You can also open and edit RDP files from the command line by using the mstsc /edit filename.rdp command.
Use the remote desktop command line to quickly access remote devices
Dameware Remote Everywhere
- Take advantage of lightweight, cloud-based remote support tools useful for companies of all sizes.
- Give your team the tools to be more productive and effective when troubleshooting.
- Easily demonstrate how your department is supporting business-critical goals.
Starts at