Enable Remote Desktop using Command Prompt or PowerShell
If you desire to use the Remote Desktop feature without opening the Windows Settings console, so you can enable Remote Desktop using Command Prompt or Windows PowerShell. If you have a remote desktop client on your mobile or another figurer, you will be able to connect it and apply your PC remotely.
Remote Desktop is a well-known facility of Windows computers that lets you connect two computers or mobile then that an individual can access another computer remotely. You lot tin can set up some bug on the computer via mobile or practise other jobs co-ordinate to your requirements. You need a Remote Desktop customer like Microsoft Remote Desktop or then on your mobile to connect ii devices.
It is possible to enable to disable Remote Desktop via Windows Settings. Yous need to caput to System > Remote Desktop to access the option. However, let's assume that the Windows Settings panel is not opening due to some reasons, and yous need to turn on the Remote Desktop characteristic. And then yous can use this method to get-go the Remote Desktop using the command line.
Enable Remote Desktop using Command line
To enable Remote Desktop using Command Prompt and Windows PowerShell, follow these steps-
- Open Command Prompt or PowerShell with administrator privilege
- Set value of fDenyTSConnections REG DWORD to 0
- Add a Firewall rule
- Restart your figurer
- Start using Remote Desktop in Windows x.
The commands are not the same for Command Prompt and Windows PowerShell.
1] Enable RDP firewall using Command Prompt
To get started, open up the Command Prompt with administrator privilege. Yous can search for information technology in the Taskbar search box, and click the Run as ambassador selection that appears on your screen. Subsequently that, enter this following command and hit Enter:
reg add "HKLM\SYSTEM\CurrentControlSet\Command\Last Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
By default, the value of fDenyTSConnections is set to i. This command will change the value to 0.
Adjacent, execute the following command:
netsh advfirewall firewall set rule grouping="remote desktop" new enable=yes
This command will add and update iii rules in the Firewall so that y'all tin can offset using the Remote Desktop.
two] Enable RDP using Windows PowerShell
Y'all demand to open the Windows PowerShell with ambassador privilege and enter the following control and hit Enter:
Prepare-ItemProperty -Path 'HKLM:\Organisation\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 0
This command will change the fDenyTSConnections value to 0. Now, you need to execute the post-obit command to add rules in the Firewall:
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
Afterwards that, you will be able to use Remote Desktop in Windows ten.
In example you want to disable Remote Desktop using Command Prompt and Windows PowerShell, yous need to enter these steps.
Related: Remote Desktop option is greyed out.
Disable Remote Desktop using Command Prompt or PowerShell
To disable Remote Desktop using Command Prompt and Windows PowerShell, follow these steps-
- Open Command Prompt or PowerShell with administrator privilege
- Set value of fDenyTSConnections REG DWORD as 1
- Add a Firewall rule
- Restart computer.
To know more than, y'all demand to read on.
Disable Remote Desktop using Command Prompt
You demand to ready the default value of fDenyTSConnections equally ane. For that, use this command-
reg add "HKLM\Arrangement\CurrentControlSet\Control\Final Server" /v fDenyTSConnections /t REG_DWORD /d 1 /f
Now you lot need to remove rules from the Firewall. For that, use this command-
netsh advfirewall firewall set rule group="remote desktop" new enable=No
Disable Remote Desktop using PowerShell
You need to change the value of fDenyTSConnections every bit 1. You can exercise that past using this command-
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-proper noun "fDenyTSConnections" -Value 1
The second command will let you remove the rules from the Firewall:
Disable-NetFirewallRule -DisplayGroup "Remote Desktop"
That's all! I hope this elementary tutorial will be helpful for you.
Source: https://www.thewindowsclub.com/enable-remote-desktop-using-command-line
Posted by: castanedaevely1942.blogspot.com

0 Response to "Enable Remote Desktop using Command Prompt or PowerShell"
Post a Comment