On earlier builds of Windows Vista Service Pack 1, if you run mstsc /? From the command prompt, the following screen is displayed. Note the section in red below. If you use version 6.1 of the Remote Desktop Client included, in order to connect to the console session for Windows Server 2003, you should use the /admin switch instead. 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.
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.)
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 Shortcut | Remote Desktop | Description |
---|---|---|
Ctrl+ALT+Del | Ctrl+ALT+END | Bring up the Windows Security dialog box. |
ALT+TAB | ALT+Page Up | Switch between programs from left to right. |
ALT+Shift+TAB | ALT+Page Down | Switch between programs from right to left. |
ALT+Esc ALT+Shift+Esc | ALT+INSERT | Switch between programs in the order they were started. |
Ctrl+Esc | ALT+HOME | Display the Start menu. |
n/a | Ctrl+ALT+BREAK | Switch the client between full-screen mode and window mode. |
ALT+Space Bar | ALT+Delete | Displays the remote window's Control menu |
ALT+Print Screen | Ctrl+ALT+NumPad MINUS | Place an image of active window onto the Terminal Services clipboard. |
Print Screen | Ctrl+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
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
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
Some rights reserved
RDP (Remote Desktop Protocol) is the important settings of Windows 10, as this allows the user to remotely take control of any computer on the network. This software is included with several versions of Windows, including 2000, XP, Vista, 7, 8, 8.1 and 10. When the user connects to the Remote desktop server, then your connection history is saved so there is no need to remember the name or IP of the remote computer. This is also convenient to the consumer’s viewpoint, but also unsafe from the security point, especially when the RDP connection is instigated from a public or untrusted computer. The information about terminal sessions is stored individually to the computer. So as per privacy and security, you need to remove RDP history.
In this article, we are discussing how to remove Remote Desktop Connection Windows 10.
How to Clear RDP Cache in Windows 10
There are three ways to clear Remote Desktop history in Windows 10. Here check out the three ways one by one:
1. How to Remove RDP Connections Cache from the Registry
For deleting Windows 10 Remote Desktop Connections history, you need to manipulate the registry entries.
Note:Manipulating registry entries is very risky as well as difficult as making a small mistake can adversely affect the entire system. So be careful while editing registry entries and create a System Restore point first. Or make use of the Registry Repair Toolas this will automatically fix the registry issues.
- Press Windows + R and then put regedit in the Run dialog box to open Registry Editor. Now click OK.
- Next, in the left Window of Registry Editor, move to following registry key:
HKEY_CURRENT_USERSoftwareMicrosoftTerminal Server ClientDefault
- In the right windows of this location, navigate for the registry string named MRUnumber where the number may be 0, 1, 2…. You need to right-click on this string > select Delete.
- Next close Registry Editor and restart your PC.
After restarting your system, you’ll realize that recent Remote Desktop Connections history is no longer visible under Start Menu.
Helpful Article: Fix: Windows 10 Remote Desktop Protocol (RDP) Not Working Properly Issue
How to clear the RDP connection history using a script
After deleting the RDP connections cache manually from the registry, here check the steps to clear remote desktop history using a script. It offers a small script (BAT file) that allows you to automatically remove RDP history.
For automating the RDP history cleanup, put the below-given script in the startup or deploy it to computers by making use of the group policy.
Please Note: Sometimes, the documents folder can be moved from standard directory c:users%username%documents (for instance, on another partition due to lack of space on system drive). So in this case, you need to change the path to the directory or manually locate the file Default.rdp!
Have a look at all the actions of the script:
- Stop the information output of the console
- Remove entire values in the registry key HKCUSoftwareMicrosoftTerminal Server ClientDefault (clear list of recent RDP connections)
- Remove entire contents from HKCUSoftwareMicrosoftTerminal Server ClientServers (clears the saved usernames and RDP connection history)
- And rebuild the earlier deleted registry key
- Then go to the directory with Default.rdp file
- Modify Default.rdp file attributes, it is by default Hidden and System
- Delete Default.rdp file
Additionally, clear the history of RDP connections by making use of the following PowerShell script:
Get-ChildItem “HKCU:SoftwareMicrosoftTerminal Server Client” -Recurse | Remove-ItemProperty -Name UsernameHint -Ea 0
Remove-Item -Path ‘HKCU:SoftwareMicrosoftTerminal Server Clientservers’ -Recurse 2>&1 | Out-Null
Remove-ItemProperty -Path ‘HKCU:SoftwareMicrosoftTerminal Server ClientDefault’ ‘MR*’ 2>&1 | Out-Null
$docs = [environment]::getfolderpath(“mydocuments”) + ‘Default.rdp’
remove-item $docs -Force 2>&1 | Out-Null
Please Note: The feature of the RDP history cleanup are built into various system and registry “cleaners”, like CCleaner etc.
If in case you desire to completely disable history of remote desktop, then try preventing everyone from writing these registry keys, (you should understand this is an unsupported configuration)
3. Clearing Cached RDP Credentials
If while establishing new remote RDP connections, before typing the password, you check an option Remember Me, and then the username and password will be saved in system Credential Manager. And when the next time you connect to the same computer, the RDP client automatically uses previously saved the password for remote desktop authorization.
The password is removed directly from client’s mstsc.exe window > choose a same connection from the connections list > click on Delete button. After that confirm saved credentials for deletion.
On the other hand, delete saved password directly from Windows Credential Manager and go to Control PanelUser AccountsCredential Manager section. Choose Manage Windows Credentials in the list of saved passwords locate the computer name (in following format TERMSRV/192.168.1.100). And after expand found item > click Remove button
Then in a domain environment, disable saving passwords for RDP connections by utilizing special policy Network access: Do not allow storage of passwords and credentials for network authentication.
So, these are ways that help you to clear remote desktop history.
Conclusion: Hope that by manipulating registry entries you can clear the RDP history in Windows 10. You can also make use of the Registry Repair Tool to avoid any other damages to the PC as taking these steps manually is risky or you can go for automatic tool.