Remote Desktop
RDP
Port: TCP 3389
mstsc
mstsc - Microsoft Terminal Services Client
To simulate Ctrl-Alt-Del use Ctrl-Alt-End.
To connect to an administering session:
mstsc <host> /admin
If using server 2003:
mstsc <host> /console
Set dimensions:
mstsc /admin /w:1024 /h:768
Remote Desktop Connection Usage
[Image:Remote Desktop Connection Usage.png]
Enable remote desktop remotely
How can I remotely enable Remote Desktop on Windows Server 2003:
What you need to do is create the new RDP listening port via the registry:
1. Run REGEDIT on your XP workstation or on your Windows 2000/2003 Server.
2. Click on File, then choose "Connect Network Registry".
3. In the Select Computer search box either browse Active Directory to locate the remote server, or type its name in the dialog box.
Click Ok.
4. In the remote machine's registry browse to the following key:
HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server
5. Under the Terminal Server key find the value named fDenyTSConnections (REG_DWORD). Change the value data from 1 (Remote Desktop disabled) to 0 (Remote Desktop enabled).
Click Ok.
6. Close Regedit.
7. Reboot the remote machine for the change to take effect. You can easily do so by opening a command prompt and typing the following command:
shutdown -m \\srv1 -r
Other references:
- Enable Remote Desktop http://technet.microsoft.com/en-us/library/cc782195%28WS.10%29.aspx
Enable Remote Desktop via Registry
enable_remote_desktop.reg:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server] "fDenyTSConnections"=dword:00000000
Change RDP Port
How to change the listening port for Remote Desktop - http://support.microsoft.com/kb/306759
- Start Registry Editor.
- Locate and then click the following registry subkey:
- HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber
- On the Edit menu, click Modify, and then click Decimal.
- Type the new port number, and then click OK.
- Quit Registry Editor.
- Restart the computer.
Increase Performance
- Show Options -> Display -> Display Configuration -> 1024x768 or Full Screen
- Show Options -> Display -> True Color (24 bit) or High Color (16 bit) or High Color (15bit)
- Show Options -> Local Resources -> Remote audio -> Remote audio playback -> Do not play
- Show Options -> Local Resources -> Remote audio -> Remote audio recording -> Do not record
- Show Options -> Local Resources -> Local devices and resources -> uncheck [ ] Printers
- Show Options -> Local Resources -> Local devices and resources -> uncheck [ ] Clipboard ** I tend to keep this one checked anyway **
- Show Options -> Local Resources -> Local devices and resources -> More -> uncheck [ ] everything
- Show Options -> Experience -> Performance -> Low-speed broadband (256 kbps-2Mbps) or Modem (56kbps)
- Show Options -> Experience -> check [x] Persistent bitmap caching
- Show Options -> Experience -> check [x] Reconnect if the connection is dropped
Save Password
cmdkey
cmdkey /add:<target_name> /user:<username> /pass:<password> # or to type in the password at prompt: cmdkey /add:<target_name> /user:<username> /pass
cmdkey /list
cmdkey /delete:<target_name>
# or delete all RAS (Remote Access) credentials with: cmdkey /delete /ras
---
The syntax of this command is: CMDKEY [{/add | /generic}:targetname {/smartcard | /user:username {/pass{:password}}} | /delete{:targetname | /ras} | /list{:targetname}] Examples: To list available credentials: cmdkey /list cmdkey /list:targetname To create domain credentials: cmdkey /add:targetname /user:username /pass:password cmdkey /add:targetname /user:username /pass cmdkey /add:targetname /user:username cmdkey /add:targetname /smartcard To create generic credentials: The /add switch may be replaced by /generic to create generic credentials To delete existing credentials: cmdkey /delete:targetname To delete RAS credentials: cmdkey /delete /ras
---
To save Remote Desktop Connection (RDP) credentials through the command line, you can use the cmdkey command. This tool allows you to add, delete, or list saved credentials for various services, including RDP.
Here's how to save RDP credentials using cmdkey:
- Open Command Prompt as Administrator:
- Search for "cmd" in the Start menu, right-click on "Command Prompt", and select "Run as administrator".
- Use the cmdkey command:
- You'll need to specify the target name (the remote computer's name or IP address), username, and password. For example:
cmdkey /add:<target_name> /user:<username> /pass:<password>
- Replace <target_name> with the remote computer's name or IP address (e.g., TERMSRV/MyRemoteMachine).
- Replace <username> with the user account you want to use to connect (e.g., MyDomain\MyUser).
- Replace <password> with the corresponding password.
- Optional: List saved credentials: You can list all saved credentials using cmdkey /list.
- Optional: Delete credentials: You can delete a specific credential using cmdkey /delete:<target_name> or delete all RAS (Remote Access) credentials with cmdkey /delete /ras.
Example:
cmdkey /add:TERMSRV/MyRemoteMachine /user:MyDomain\MyUser /pass:MyPassword
This command will save the credentials for the user "MyDomain\\MyUser" with the password "MyPassword" for the remote machine "MyRemoteMachine".
ref: Google AI [1]
Credential Manager
Another way without changing GPO is advised on the neighbor site - it worked for me:
Warning! Nobody actually knows what these changes really do. Use at your own risk.
Go to Control Panel -> Credential Manager on the local computer you are trying to connect from.
You will see three sections:
Windows Credentials Certificate-Based Credentials Generic Credentials
Remove the credentials from Windows Credentials and add it to Generic Credentials.
ref: [2]
Issues
Error:
The security database on the server does not have a computer account for this workstation trust relationship
Solution:
- RDP was setup with the new security settings
- Use a Vista, Win7 or above system to connect
- Reduce the RDP security settings
keywords
- ↑ https://www.google.com/search?q=save+windows+credentials+remote+desktop+command+line&rlz=1C1GCEU_en&oq=save+windows+credentials+remote+desktop+command+line&gs_lcrp=EgZjaHJvbWUyCQgAEEUYORigATIHCAEQIRirAtIBCDc5NTdqMGo3qAIAsAIA&sourceid=chrome&ie=UTF-8
- ↑ https://superuser.com/questions/1693095/rdp-connection-wont-use-the-saved-credentials-for-certain-remote-computers