Ways to Enable RDP at a Glance
The ways to enable RDP below all change the same setting, so pick the one that fits how you reach the machine.
This guide applies to Windows 11 and Windows 10 in the Pro, Enterprise and Education editions and to Windows Server 2016, 2019, 2022 and 2025. The edition rule is about the computer being connected to. Windows Home cannot host incoming Remote Desktop sessions, but a device running Home, macOS, Linux or a phone can still be the one that connects. You need an account in the Administrators group on the host to change any of these settings.
Standard Windows 10 releases in the Home and Pro and Enterprise and Education editions reached end of support on October 14, 2025, while LTSC releases follow their own lifecycles. The steps still work on Windows 10, but a machine that accepts remote sign ins is better on a supported release or covered by extended security updates.
| Method | Use it when | Firewall |
|---|---|---|
| Settings app | You sit at a Windows 11 PC or a server with a desktop | Check it afterwards with the firewall command below |
| Server Manager | You manage Windows Server with Desktop Experience | Check it afterwards |
| SConfig | You run Server Core with no desktop | Check it afterwards |
| PowerShell or registry | You script the change or have only a command prompt | Not changed, enable the rules yourself |
Turning the feature on is one of four things that must be true before a sign in works. Remote Desktop must be enabled, the listener must be running, a firewall rule must allow the port, and your account must be allowed to sign in. Network Level Authentication then decides which clients can start a session. The sections below take these in order and each ends with a check.
Enable Remote Desktop in Windows 11 Settings
To enable Remote Desktop in Windows 11 Settings, select Start, then Settings, then System, then Remote Desktop.
Switch the Remote Desktop toggle to On and select Confirm in the dialog that appears. Windows 10 and Windows Server with a desktop use the same path. The exact label of the toggle varies a little between releases.
The same screen holds the two settings covered later in this guide. On Windows 11 the arrow beside the toggle expands to show the Network Level Authentication requirement, and on Windows 10 the same option sits behind Advanced settings. Remote Desktop users opens the list of accounts allowed to connect. In earlier releases that link is named Select users that can remotely access this PC.
The PC has to be powered on and connected to the network to be reached, which Microsoft lists as a requirement. A PC that is asleep or hibernating does not answer, so check Settings, System, Power and stop it sleeping during the hours you need remote access.
If the toggle is missing, check the edition under Settings, System, About. If it is greyed out or switches itself back off, a Group Policy is probably controlling it, which the errors section covers.
Enable RDP on Windows Server
To enable RDP on Windows Server with a desktop, use the Settings path above or Server Manager.
This switches on Remote Desktop for administering the server. It is a different thing from deploying the Remote Desktop Services role, which is built for hosting many user sessions or virtual desktops and is not needed for ordinary remote administration. If you want a server where this is already set up, Windows VPS hosting is delivered with Remote Desktop enabled.
Server Manager on a Desktop Install
Server Manager on a desktop install shows the Remote Desktop state on its Local Server screen.
Open Server Manager, select Local Server and select the Disabled link next to Remote Desktop. System Properties opens on the Remote tab. Choose Allow remote connections to this computer and keep the Network Level Authentication box under it ticked, then select OK. Running SystemPropertiesRemote from a command prompt opens the same tab directly. Server Manager can take a moment to show the new state, so refresh the view.
SConfig on Server Core
SConfig on Server Core turns Remote Desktop on from its text menu, with no desktop needed.
Windows Server 2022 and later start SConfig automatically after sign in on Server Core, unless that auto launch was turned off. On Windows Server 2019 and earlier, start it by running SConfig.cmd from a command prompt. On 2022 and later, if the menu is not on screen, type SConfig in PowerShell and press Enter. Type 7 and press Enter to open the Remote desktop settings, then type E and press Enter to enable it. SConfig then asks which clients to allow. Type 1 to allow only clients that use Network Level Authentication, which Microsoft labels the more secure choice, or 2 to allow clients running any version of Remote Desktop.
How to Enable RDP With PowerShell
To enable RDP with PowerShell, set one registry value to 0 in an administrator window, then handle the firewall as a separate step.
The value is fDenyTSConnections. Microsoft documents 1 as Remote Desktop disabled and 0 as enabled.
Record the Current State First
Before changing anything, record the current state so you know what to put back.
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server' -Name 'fDenyTSConnections'
reg export "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" "$env:USERPROFILE\Desktop\TerminalServer-backup.reg"The first command prints the value as it is now. The second saves the whole Terminal Server key, including the listener settings under it, to a file on your desktop. Importing that file with reg import restores every value it contains.
Turn Remote Desktop On
Writing 0 to the value turns Remote Desktop on.
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server' -Name 'fDenyTSConnections' -Value 0Run the Get-ItemProperty line again and confirm it now reports 0. That proves the setting is stored. It does not prove the listener is up or that the firewall lets anyone in, which the next checks cover.
Enable RDP in the Registry Editor
The Registry Editor makes the same change by hand. Open regedit and go to this key.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal ServerOpen fDenyTSConnections, change the value data from 1 to 0 and select OK. For another computer on your network, Microsoft describes using File, then Connect Network Registry in the editor and changing the value there, which needs administrator rights on that computer and its Remote Registry service running. From a plain command prompt the equivalent is one line.
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /fConfirm the Listener Is Running
Confirm the listener is running with qwinsta, which lists the sessions and listeners on the machine.
qwinsta
Get-Service -Name TermService, UmRdpService
Get-NetTCPConnection -State Listen -LocalPort 3389
Get-NetUDPEndpoint -LocalPort 3389In the qwinsta output, a line named rdp-tcp with the state Listen means the listener works. TermService must show Running. The Microsoft troubleshooting guide expects UmRdpService to be running too, so start it if it is stopped, but the qwinsta result and the TCP check below are the checks that decide whether the listener works. The third command lists what is listening on TCP 3389, the default port, and on a typical machine shows one row for IPv4 (0.0.0.0) and one for IPv6 (::). The fourth does the same for the optional UDP transport. Use your own number if the port was changed.
If the value is 0 but no rdp-tcp listener appears, restart the Remote Desktop Services service with Restart-Service -Name TermService -Force or reboot. Restarting the service disconnects every remote session on the machine. If the listener is still missing after that, check the three things below before touching the listener configuration.
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name 'fEnableWinStation'
Get-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'fDenyTSConnections' -ErrorAction SilentlyContinue
Get-Service -Name TermService, UmRdpServiceMicrosoft documents fEnableWinStation as 1 for a listener that is enabled. The second line reads the policy copy of fDenyTSConnections. No output means no policy sets it. If both the local value and the policy value exist, both must be 0, and the policy value is changed through Group Policy, not by editing it here. TermService must be running, and UmRdpService should be started if it is stopped. Beyond these checks, the Microsoft troubleshooting guides under Sources cover repairing the listener itself.
Allow RDP Through Windows Firewall
To allow RDP through Windows Firewall, enable the built in Remote Desktop rules, which are a separate setting from the registry value.
Look before you change anything. This lists the rules in the group and whether each is enabled.
Get-NetFirewallRule -Name 'RemoteDesktop-*' | Select-Object Name, DisplayName, Enabled, Profile, Direction, ActionThe query matches on the internal rule names, which stay the same whatever display language Windows uses. Microsoft names two rules to enable, Remote Desktop - User Mode (TCP-In) and Remote Desktop - User Mode (UDP-In). The TCP rule carries the session. The UDP rule allows the optional UDP transport, and a connection can work over TCP alone. Either command below enables them.
Enable-NetFirewallRule -DisplayGroup 'Remote Desktop'
Enable-NetFirewallRule -Name 'RemoteDesktop-UserMode-In-TCP', 'RemoteDesktop-UserMode-In-UDP'The first line enables every rule in the group. The second enables only the two rules named. The group label is translated on Windows installs in other languages, so -DisplayGroup can fail to match there, while rule names are not translated. If either rule is missing from the listing, do not enable a similar looking rule in its place. Check the Windows version and how its Remote Desktop firewall rules are managed first. Never run Enable-NetFirewallRule with no parameters, because Microsoft warns that doing so enables all firewall rules on the computer.
Run the listing command again and check that Enabled reads True for both rules. Check the Profile column too. A rule only applies while the network is set to one of the profiles it lists, so a rule limited to Domain and Private does nothing on a connection Windows treats as Public. On a domain joined computer a Group Policy can also override local rules.
Limit the Firewall Rule to Addresses You Trust
Limit the firewall rule to addresses you trust, so only those source addresses reach the port at all.
Set-NetFirewallRule -Name 'RemoteDesktop-UserMode-In-TCP', 'RemoteDesktop-UserMode-In-UDP' -RemoteAddress 203.0.113.25The addresses in this guide, 203.0.113.10 for the server and 203.0.113.25 for the place you connect from, are documentation examples. Replace them with your own. -RemoteAddress also accepts a list, a subnet or IPv6 addresses.
A source limit reduces who can reach the port. It does not replace strong passwords, and it needs updating when your own address changes.
Check the Firewalls Outside Windows
Check the firewalls outside Windows as well, because each one must allow the port separately. That means a cloud security group, a hosting panel firewall or a port forward on a home router.
Where you connect from decides how much to open. On the same private network, connect to the private address or name of the machine and open nothing to the internet. From another network, Microsoft describes two options, a VPN or port forwarding, and prefers the VPN because the PC is then not exposed to the public internet. If you must forward or open the port, limit the source addresses on the router or cloud firewall as well as in Windows.
Network Level Authentication Settings
Network Level Authentication makes a user sign in before the remote session is created, and Microsoft recommends keeping it on.
With it on, a client has to present valid credentials before Windows builds a desktop session for it. It does not limit which addresses can reach the port and it does not stop password guessing, so it works alongside the firewall and good passwords, not in place of them. It is also not multifactor authentication. Where you need a second factor, place a VPN configured to require one, or a Remote Desktop Gateway connected to a multifactor provider, in front of the RDP server.
The setting lives in the UserAuthentication value of the listener. Read it before you assume anything.
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name 'UserAuthentication'A result of 1 means Network Level Authentication is required. 0 means it is not. To require it, set the value to 1.
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name 'UserAuthentication' -Value 1Read the value again to confirm it, then prove it with a new connection while your current session stays open. If the new connection fails, you still have the old session to set the value back. A policy that enforces the setting takes priority over this registry value, in which case your change will not hold.
Microsoft notes that older clients may not support Network Level Authentication and that turning it off should be temporary. The same command with -Value 0 turns the requirement off. Updating the client is the better fix where that is possible.
What a Security Mismatch Looks Like
A security mismatch looks like a failure before any password prompt, because client and server cannot agree on how to sign in.
We reproduced one from Linux with FreeRDP 2.11.5 on Ubuntu 24.04.5. In the xfreerdp manual, /sec forces a specific protocol security and +auth-only stops after authentication. The client was told to accept only Network Level Authentication with /sec:nla, and the listener was xrdp 0.9.24, which did not offer it. The user name and password in the command are throwaway values, since the attempt fails before they are used. This is the reverse of an old client meeting a Windows host that requires it, and the result is the same kind of failure. The output below is real, with timestamps removed.
xfreerdp /v:203.0.113.10 /u:demo /p:x /sec:nla /cert:ignore +auth-only[ERROR][com.freerdp.core.nego] - Protocol Security Negotiation Failure
[ERROR][com.freerdp.core] - rdp_client_connect:freerdp_set_last_error_ex ERRCONNECT_SECURITY_NEGO_CONNECT_FAILED [0x0002000C]
[ERROR][com.freerdp.core.connection] - Error: protocol security negotiation or connection failure
[ERROR][com.freerdp.core] - Authentication only, exit status 1The port was open and the service was answering, yet no sign in was possible. That is why a passing port test alone does not prove Remote Desktop is usable.
Choose Who Is Allowed to Sign In
Who is allowed to sign in over Remote Desktop is a separate setting from turning the feature on.
Members of the Administrators group can connect once Remote Desktop is enabled. Other accounts need to be in the local Remote Desktop Users group. Add an account and then list the group to confirm it.
Add-LocalGroupMember -Group 'Remote Desktop Users' -Member 'alice'
Get-LocalGroupMember -Group 'Remote Desktop Users'Replace alice with a real account, using its sign in name and not its display name. For a domain account write it as DOMAIN\alice. When you sign in from the client with a local account of the host, COMPUTERNAME\alice makes it clear which machine the account belongs to. The account also needs a password. Windows enables the policy Accounts: Limit local account use of blank passwords to console logon only by default, so a local account with a blank password cannot sign in over Remote Desktop. The same list is behind the Remote Desktop users link in Settings and the Select Users button in System Properties, so use whichever you prefer.
Group membership is half of the rule. The group must also hold the Allow log on through Remote Desktop Services right, found in secpol.msc under Local Policies, User Rights Assignment. Administrators and Remote Desktop Users hold it by default on workstations and on servers that are not domain controllers. On a domain controller the default is Administrators only. An account listed under Deny log on through Remote Desktop Services is refused even if it is in an allowed group, and a domain Group Policy overrides the local policy.
Listing the group shows membership only. The real proof is a sign in with that account from another machine. Add as few accounts as the work needs, since each one is another password that can be guessed.
Connect to the Enabled RDP Server
To connect to the enabled RDP server you need its name or address, an allowed account and a Remote Desktop client.
On the host, hostname prints the computer name and ipconfig lists its IPv4 and IPv6 addresses. Use the private address or the name when you are on the same network or connected through a VPN. Without a VPN you need the public address, or a name that resolves to it, plus a port forward or firewall rule on the way. A computer name only works where the connecting device can resolve it, so fall back to the IP address if the name is not found.
hostname
ipconfigOn a Windows client, open Start, type Remote Desktop Connection, enter the name or address in the Computer box and select Connect, then enter the user name and password of an allowed account. The command line does the same.
mstsc /v:203.0.113.10Replace the example address with your own. Microsoft documents the form as <code>/v:server:port</code>, so a host moved to another port is reached as 203.0.113.10:3390, with that port allowed in every firewall on the way.
On macOS, iPhone, iPad and Android, Microsoft provides Windows App. Select the add icon on the Devices tab, enter the computer name or address as the PC name, save it and select its card to connect. On Linux, FreeRDP and Remmina take the same address.
A certificate warning appears when the host uses a self signed certificate or one the client does not trust. A matching computer name alone does not prove the certificate is genuine. For a server that matters, compare the certificate fingerprint with one you obtained through a trusted channel, such as the provider console, before you accept it, and treat an unexpected change in the warning as a reason to stop.
Test RDP Access From Another Machine
Test RDP access from another machine, because a check on the server itself skips every firewall in between.
Port Test From Windows
A port test from Windows uses PowerShell, which has one built in.
Test-NetConnection -ComputerName 203.0.113.10 -Port 3389TcpTestSucceeded : True means a TCP connection to the port was made. False means it was not, which can be the firewall, no listener, a wrong address or a machine that is off.
Port Test From Linux or macOS
A port test from Linux or macOS uses netcat, and the wording of a failure tells you which step is missing.
We ran the three cases on Ubuntu 24.04.5 against an xrdp 0.9.24 listener on TCP 3389 at the example address inside an isolated test network. First with the listener running, then with a firewall rule dropping the port, then with the listener stopped. The command was the same each time and the three results are real.
nc -zv -w 3 203.0.113.10 3389Connection to 203.0.113.10 3389 port [tcp/ms-wbt-server] succeeded!
nc: connect to 203.0.113.10 port 3389 (tcp) timed out: Operation now in progress
nc: connect to 203.0.113.10 port 3389 (tcp) failed: Connection refusednmap reports the same three cases as port states. This is the real result with the listener running, followed by the state line from each of the other two cases.
nmap -Pn -sV -p 3389 203.0.113.10PORT STATE SERVICE VERSION
3389/tcp open ms-wbt-server xrdp
3389/tcp filtered ms-wbt-server
3389/tcp closed ms-wbt-server| netcat says | nmap state | What it usually means on Windows |
|---|---|---|
| succeeded | open | Something is listening and the firewalls allow the port |
| timed out | filtered | No answer came back, which can be a firewall dropping packets, a routing fault, a wrong address or a machine that is off |
| Connection refused | closed | The machine answered but nothing is listening, so check fDenyTSConnections and qwinsta |
The test listener was xrdp on Linux, so the version column says xrdp. A Windows host normally shows as Microsoft Terminal Services there. For a timeout, confirm the address and that the machine is up before changing firewall rules. The meaning of each state follows the nmap port state definitions.
These tests have limits. They check TCP only, they say nothing about the UDP transport, and our test network had no IPv6, so IPv6 was not tested. If you connect over IPv6, run the same checks against the IPv6 address, with nc -6 on Linux. A successful TCP test confirms that the port is reachable, not that Remote Desktop works. The final check is to connect with an allowed account, complete the sign in and see the remote desktop open.
Errors When a Step Is Missing
The errors when a step is missing point at different layers, so read the exact wording before you change anything.
| What you see | Step likely missing | What to check |
|---|---|---|
| Remote Desktop can't connect to the remote computer for one of these reasons | Remote Desktop is off, the listener is down, or the network or a firewall blocks the port | Run the outside port test, then check fDenyTSConnections, qwinsta and the firewall rules |
| The connection was denied because the user account is not authorized for remote login | The account lacks the right to sign in through Remote Desktop | Add it to Remote Desktop Users and check Allow log on through Remote Desktop Services |
| The system administrator has restricted the type of logon (network or interactive) that you may use | Network Level Authentication is required and the account is not in Remote Desktop Users, or a policy denies the logon type | Add the user to the group and review the allow and deny rights in secpol.msc |
| The setting is greyed out or returns to off | A Group Policy disables Remote Desktop | Run the gpresult report below |
| Port test passes but the client fails before a password prompt | Client and server cannot agree on sign in security | Update the client, or compare it with the UserAuthentication value |
The first message lists three reasons itself, which are remote access not enabled, the computer turned off and the computer not available on the network. It cannot tell you which one applies, and that is the gap the outside port test fills.
To find a policy that blocks Remote Desktop, build a policy report as administrator and read the policy value directly.
gpresult /H C:\gpresult.html
Get-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'fDenyTSConnections' -ErrorAction SilentlyContinueIn the report, look for Allow users to connect remotely by using Remote Desktop Services. If it shows Disabled, the Winning GPO entry names the policy to change. The second command reads the policy copy of the value. No output means no policy sets it on this machine. A 1 there blocks connections whatever the local value says, and the fix is to change the policy, then run gpupdate /force.
How to Turn RDP Off Again
To turn RDP off again, set the value back to 1 and disable the firewall rules you enabled.
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server' -Name 'fDenyTSConnections' -Value 1
Disable-NetFirewallRule -Name 'RemoteDesktop-UserMode-In-TCP', 'RemoteDesktop-UserMode-In-UDP'Do this from the console or another access path. Run over Remote Desktop, it removes the access you are using, and you will not be able to reconnect that way. The Settings toggle, Server Manager and option D in the SConfig Remote desktop menu do the same job. Confirm with the outside port test, which should no longer report success.
If several values were changed and you want the earlier state back, import the backup you saved at the start and restart. This writes back every value the file holds, including the listener settings as they were when you exported them.
reg import "$env:USERPROFILE\Desktop\TerminalServer-backup.reg"
Restart-ComputerKeeping an Enabled RDP Server Safe
Keeping an enabled RDP server safe is a matter of stacking limits, because no single setting covers every risk.
| Measure | What it does | What it does not do |
|---|---|---|
| Firewall rule limited to your addresses | Blocks connections from other source addresses | Protect you if a trusted address is compromised |
| Network Level Authentication on | Requires credentials before a session is created | Stop password guessing or limit who can reach the port |
| Strong unique passwords | Make guessing far harder | Help if a password is stolen elsewhere and reused |
| Short Remote Desktop Users list | Leaves fewer accounts to attack | Limit what an administrator account can do |
| A VPN in front | Keeps the port off the public internet | Remove the need for the other measures |
If you would rather start from a machine where this is already working, a hosted Windows RDP server is delivered with Remote Desktop switched on and full administrator access, so the firewall scope and the user list stay under your control.
Questions people ask
How do I enable RDP from the command line?
Set fDenyTSConnections to 0 with reg add or Set-ItemProperty, then enable the Remote Desktop firewall rules. Both need an administrator prompt.
Can Windows 11 Home accept Remote Desktop connections?
No. Windows Home can connect out to other machines but cannot host a session. Hosting needs Pro, Enterprise, Education or Windows Server.
Do I need to restart after enabling RDP?
Usually not. Run qwinsta and look for rdp-tcp in the Listen state. If it is missing, restart Remote Desktop Services or reboot.
Which port does enabling RDP open?
TCP 3389 unless the port was changed. The built in firewall group also has a rule for UDP 3389, which the optional UDP transport uses.
Why can an administrator connect but a standard user cannot?
Standard accounts must be added to the Remote Desktop Users group. Administrators are allowed as soon as Remote Desktop is enabled.
Should I turn off Network Level Authentication to fix a connection?
Only as a short test. Microsoft recommends keeping it on, so update the client or fix the account, then set the value back to 1.
How do I check whether RDP is enabled?
Read fDenyTSConnections, where 0 means enabled. Then confirm with qwinsta on the machine and a port test from another one.
Can I enable RDP without opening port 3389 to the internet?
Yes. Remote Desktop works over a private network or a VPN with nothing opened publicly. The firewalls on that path must still allow the port.
Sources
- Microsoft Learn, Enable Remote Desktop on your PC
- Microsoft Learn, General Remote Desktop connection troubleshooting
- Microsoft Learn, Remote Desktop cannot connect to the remote computer
- Microsoft Learn, Troubleshoot access denied and user not authorized errors
- Microsoft Learn, The system administrator has restricted the types of logon
- Microsoft Learn, Allow log on through Remote Desktop Services
- Microsoft Learn, Configure a Server Core installation with SConfig
- Microsoft Learn, Enable-NetFirewallRule
- Nmap reference guide, port scanning basics