While you can manage this feature through the Settings app, you can also enable Remote Desktop on Windows 10 using PowerShell. You may want to use this method to create a script to configure Remote Desktop on multiple devices quickly or send an automated script to users to set up the feature automatically without additional steps. In this guide, you will learn the steps to use PowerShell to enable (or disable) Remote Desktop on Windows 10 and open the required firewall ports for a successful connection.

Enable Remote Desktop using PowerShell Disable Remote Desktop using PowerShell

Enable Remote Desktop using PowerShell on Windows 10

To enable the remote desktop protocol with PowerShell, use these steps: Once you complete the steps, you can use the Remote Desktop modern app or the old Remote Desktop Connection app to access your computer remotely, even with the firewall enabled.

Disable Remote Desktop using PowerShell

To disable the remote desktop protocol with PowerShell, use these steps: After you complete the steps, the Remote Desktop feature will be disabled, and the firewall port will be closed.

We’re focusing this guide on PowerShell, but you can use these steps to perform the same tasks using Command Prompt. All content on this site is provided with no warranties, express or implied. Use any information at your own risk. Always backup of your device and files before making any changes. Privacy policy info.