How To

Deploy Remote Desktop Services on Windows Server 2025

You can run a whole Remote Desktop Services deployment on one domain-joined Windows Server box in about 15 minutes of role installs. The catch is that the remote desktop services installation on Windows Server 2025 failed validation twice in this lab before it installed anything, and the certificate it ends up with won’t load in a Chromium browser.

Original content from computingforgeeks.com - post 180647

You’ll build a session-based RDS deployment with PowerShell, publish a collection through RD Web, set the RDS CAL licensing mode and connect from Windows 11. Built and run in October 2026 on Windows Server 2025 Datacenter and a Windows 11 24H2 client.

How the RDS roles fit on one server

RDS splits the job into role services, and a quick-start deployment stacks all of them on one member server. You get a working setup for a lab, a small office or a proof of concept, because one box is enough when a handful of people log on at once. When you outgrow it, you move the broker and RD Web to their own servers, and the cmdlets below stay the same apart from the server names. You’ll end up with these four roles on one host:

  • RD Connection Broker: keeps the deployment config in Windows Internal Database and sends each user to a Session Host.
  • RD Web Access: the IIS site at /RDWeb that lists collections and hands out signed .rdp files.
  • RD Session Host: the server your users actually log on to.
  • RD Licensing: issues RDS CALs once it is activated.

Keep the domain controller on its own VM, so your Session Host users never log on to a DC. All the RDS traffic from the client goes to the RDS host, and the client only needs the DC for the same DNS and Kerberos any domain member uses, as the diagram shows.

RDS architecture diagram: QS-WIN11 reaches QS-RDS01 over 443 RD Web and 3389 RDP, and both QS-WIN11 and QS-RDS01 use QS-DC01 for DNS and Kerberos

RD Gateway isn’t part of this build. Without it, port 3389 has to be reachable from wherever your users sit, which is fine on a LAN or a VPN. For anything outside the office, you’d put the gateway in front so that only 443 faces the internet. It installs as one more role on the same deployment later, so leaving it out now doesn’t lock you into anything.

Prerequisites

You need Active Directory before anything else. The deployment cmdlets reach every role server over PowerShell remoting with your domain credentials, and Per User licensing can’t be tracked in a workgroup at all, so a workgroup server is a dead end for this setup. The sizes below are what the lab ran on, which is a floor for a handful of test users rather than a production figure, because session hosts need RAM in proportion to how many people log on at once. Have these ready before you start.

  • A domain controller with DNS. The lab uses QS-DC01 at 10.0.1.10 for the qs.lab domain (installing AD DS on Windows Server covers that part, or set up AD DS with PowerShell for the scripted route).
  • A second Windows Server 2025 install for RDS, here QS-RDS01 at 10.0.1.11 with 2 vCPUs and 6 GB RAM, its DNS pointed at the DC.
  • A domain admin account. A local administrator fails, as shown further down.
  • Both servers patched to a known build. The lab servers were on build 26100.32230 (KB5073379); the cmdlets weren’t retested on later cumulative updates.
  • A Windows 11 client in the same domain for testing, here QS-WIN11 at 10.0.1.20.

If you clone your Windows guests from one template, sysprep it first. Clones that share a machine SID don’t join the same domain cleanly, so the lab used a generalized image for both servers, and the Windows Server template guide for Proxmox shows how to build one that generalizes properly.

Create the RDS users group

You grant access to a session collection through an AD group, so create the group first. On the domain controller, add a group and put a test user in it.

New-ADUser -Name joshua -SamAccountName joshua -UserPrincipalName [email protected] -AccountPassword (Read-Host -AsSecureString "Password") -Enabled $true
New-ADGroup -Name "RDS Users" -GroupScope Global -GroupCategory Security
Add-ADGroupMember "RDS Users" -Members joshua
Get-ADGroupMember "RDS Users" | Select-Object SamAccountName

The last command lists the group’s members, and your new user should be the only one.

SamAccountName
--------------
joshua

You’ll lock the collection to this group in a later step, so add every user who needs a desktop here rather than to the collection itself. Managing one group in AD is easier than editing the collection each time someone joins, and it keeps the access list where your other access lists already live.

Join the RDS host to the domain

On QS-RDS01, check that the domain name resolves through the DC, then join it. If Resolve-DnsName qs.lab fails, fix the DNS server on your NIC first, because the join and every later RDS step depend on it.

Resolve-DnsName qs.lab -Type A
Add-Computer -DomainName qs.lab -Credential QS\Administrator
Restart-Computer

After the reboot, sign in as QS\Administrator, not as the local administrator, since the deployment fails validation under a local account. Then confirm the secure channel to the DC is healthy.

Test-ComputerSecureChannel

A result of True means the computer account and the DC agree. On the Proxmox guest, the restart after the join hung at shutdown and needed a reset from the host. If your VM sits on “Restarting” for minutes, a hard reset is safe here, because the join is already committed to AD before the restart.

Install the Session Host role first

When you run the deployment cmdlet on the same server that will host sessions, it refuses to start, because installing RD Session Host needs a reboot and the cmdlet won’t reboot the machine it is running on. Install that one role yourself and restart before the deployment.

Install-WindowsFeature RDS-RD-Server -IncludeManagementTools
Restart-Computer

You could also run the cmdlet from a different domain-joined machine, which can restart the RDS host remotely, but that route was not tested here. On a single-box setup, pre-installing the role is the shorter path, so it is the one this guide uses. Once the server comes back, the reboot pending flag is clear and the deployment has nothing left to restart.

Run the RDS deployment

You create a session-based deployment in PowerShell with New-RDSessionDeployment. It installs the broker, RD Web Access with IIS and Windows Internal Database for the broker, then registers all of it as one deployment. Use FQDNs for every role, as Microsoft’s New-RDSessionDeployment reference asks, and run it from an elevated PowerShell signed in as the domain admin.

Import-Module RemoteDesktop
New-RDSessionDeployment -ConnectionBroker QS-RDS01.qs.lab -WebAccessServer QS-RDS01.qs.lab -SessionHost QS-RDS01.qs.lab

It prints nothing when it works, and on the 2 vCPU lab guest it took 601 seconds. Don’t cancel it because the console looks idle, since it shows no progress and you can’t tell how far a cancelled run got. When it returns, check what the deployment registered.

Get-RDServer -ConnectionBroker QS-RDS01.qs.lab

Three roles on one server, with licensing still missing, is the healthy result at this point.

Server          Roles
------          -----
QS-RDS01.QS.LAB {RDS-RD-SERVER, RDS-CONNECTION-BROKER, RDS-WEB-ACCESS}

The role installs also enable their own inbound firewall rules, and Windows Firewall stayed on for all three profiles in the lab. You get these rules without touching the firewall:

  • Remote Desktop User Mode for TCP and UDP 3389
  • World Wide Web Services HTTPS for RD Web on 443
  • Remote Desktop Services and Licensing Server RPC, named pipe and WMI rules

Nothing had to be opened by hand on the host itself. If a network firewall sits between your users and the server, open 443 and 3389 there, and the Windows Server firewall port guide shows the rule syntax if you ever need to add one on the server.

Create a session collection

A deployment with no collection gives your users nothing to open, so create one that publishes the full desktop and limit it to the group from earlier.

New-RDSessionCollection -CollectionName "Office Desktops" -SessionHost QS-RDS01.qs.lab -CollectionDescription "Full desktop for office staff" -ConnectionBroker QS-RDS01.qs.lab
Set-RDSessionCollectionConfiguration -CollectionName "Office Desktops" -UserGroup "QS\RDS Users" -ConnectionBroker QS-RDS01.qs.lab
Get-RDSessionCollection -ConnectionBroker QS-RDS01.qs.lab

The collection took 15 seconds to create and reports as a pooled desktop.

CollectionName  Size ResourceType   CollectionType  CollectionDescription
--------------  ---- ------------   --------------  ---------------------
Office Desktops 1    Remote Desktop PooledUnmanaged Full desktop for office staff

The Size column counts Session Hosts in the collection. With one host the broker has nothing to choose between, but once you add a second host it decides where each logon lands, which is the reason it exists at all. Keep the collection name short and free of odd characters, because it ends up inside the .rdp file that RD Web hands out.

Add RD Licensing and set the CAL mode

Microsoft gives a new deployment a licensing grace period of 120 days, during which no license server is required. After that, the Session Host needs a license server to hand out CALs. Before this step, Get-RDLicenseConfiguration reported Mode : NotConfigured with no license server, so you add the licensing role and pick the RDS CAL licensing mode in one go.

Add-RDServer -Server QS-RDS01.qs.lab -Role RDS-LICENSING -ConnectionBroker QS-RDS01.qs.lab
Set-RDLicenseConfiguration -LicenseServer QS-RDS01.qs.lab -Mode PerUser -ConnectionBroker QS-RDS01.qs.lab -Force
Get-RDLicenseConfiguration -ConnectionBroker QS-RDS01.qs.lab

The licensing role install took 131 seconds, and the mode now points at the new license server.

Mode          : PerUser
LicenseServer : {QS-RDS01.qs.lab}

The mode you pick should follow the CALs you bought, not the other way round, because a mismatch leaves your license server holding CALs the Session Host never asks for. The rules below come from Microsoft’s RDS CAL documentation.

CAL modeCountsEnforcedWorks in a workgroup
Per UserEach named userNo, it can be over-allocatedNo, tracking needs AD
Per DeviceEach client deviceYes, a temporary CAL lasts 90 daysYes

Per User suits staff who connect from several devices, and Microsoft’s HTML5 web client docs ask for Per User CALs. Per Device suits shared kiosks and shift PCs. CALs also have to match the Session Host version, and a 2022 RDS CAL isn’t valid against a 2025 Session Host, so you buy and install 2025 CALs on a 2025 license server.

Add the license server to its AD group

Add-RDServer didn’t add the server to the domain’s Terminal Server License Servers group. The group was still empty afterwards, and in a domain Microsoft expects the license server’s computer account to be a member. Run this on the DC to add it.

Add-ADGroupMember -Identity "Terminal Server License Servers" -Members 'QS-RDS01$'
Get-ADGroupMember "Terminal Server License Servers" | Select-Object Name,objectClass

The computer account should now be the group’s only member.

Name     objectClass
----     -----------
QS-RDS01 computer

Note the trailing $ on the member name, since that’s how AD names computer accounts, and it’s the computer, not any admin user, that the license server runs as.

Activate the license server

An unactivated license server can’t issue CALs. Activation contacts Microsoft’s clearinghouse over the internet and needs a name, company and country on record first, so the RDS host needs outbound internet access for this step. The licensing WMI class does it without a wizard; run this on the RDS host with your own company details.

$ls = Get-CimInstance -ClassName Win32_TSLicenseServer
$ls.FirstName = "Lab"; $ls.LastName = "Admin"; $ls.Company = "QS Lab"; $ls.CountryRegion = "United States"
Set-CimInstance -InputObject $ls
Invoke-CimMethod -InputObject (Get-CimInstance Win32_TSLicenseServer) -MethodName ActivateServerAutomatic
(Invoke-CimMethod -InputObject (Get-CimInstance Win32_TSLicenseServer) -MethodName GetActivationStatus).ActivationStatus

The status call returned 0, which in Microsoft’s GetActivationStatus docs means activated (1 is not activated, 2 is unknown). You get a clearer answer from RD Licensing Manager (licmgr.exe), which showed the server as activated, discovered at domain scope, with a clean configuration.

RD Licensing Manager on Windows Server 2025 showing QS-RDS01 activated with domain discovery scope and configuration OK

On a real deployment, you’d install the CALs you bought next, from the same console. The lab had none. Before activation, the grace period check below reported 119 days left on the Session Host, and after activation and the first user logon it reported 0.

$ts = Get-CimInstance -Namespace root/cimv2/TerminalServices -ClassName Win32_TerminalServiceSetting
(Invoke-CimMethod -InputObject $ts -MethodName GetGracePeriodDays).DaysLeft

That logon still went through, which fits Microsoft’s note that Per User CALs are not enforced. Don’t read that as permission to skip buying them, because Per User is a compliance obligation even when nothing blocks the connection.

Replace the self-signed RD Web certificate

Most quick-start guides skip this step, and it broke RD Web in the lab. After the deployment, Get-RDCertificate listed every role as NotConfigured, and IIS was serving its own self-signed CN=QS-RDS01.qs.lab certificate on 443. That certificate’s Key Usage is only Key Encipherment, Data Encipherment, with no Digital Signature, and headless Chromium refused the page outright with net::ERR_SSL_KEY_USAGE_INCOMPATIBLE.

In production, you’d use a certificate from an internal CA or a public one whose name matches the FQDN your users type, so clients trust it without any import. For the lab, a fresh self-signed certificate with the right key usage is enough, applied to all three roles that use one.

New-Item -ItemType Directory -Force C:\lab | Out-Null
$c = New-SelfSignedCertificate -DnsName QS-RDS01.qs.lab -CertStoreLocation Cert:\LocalMachine\My -KeyUsage DigitalSignature,KeyEncipherment -NotAfter (Get-Date).AddYears(2)
$pw = Read-Host -AsSecureString "PFX password"
Export-PfxCertificate -Cert $c -FilePath C:\lab\rds.pfx -Password $pw
Export-Certificate -Cert $c -FilePath C:\lab\rds.cer
foreach ($r in "RDWebAccess","RDRedirector","RDPublishing") { Set-RDCertificate -Role $r -ImportPath C:\lab\rds.pfx -Password $pw -ConnectionBroker QS-RDS01.qs.lab -Force }
Get-RDCertificate -ConnectionBroker QS-RDS01.qs.lab

A level of Untrusted is correct for a self-signed certificate. What matters is that each role now has one with a real expiry date. The whole block finished in under a minute.

        Role Level     ExpiresOn           Subject
        ---- -----     ---------           -------
RDRedirector Untrusted 10/30/2028 20:45:38 CN=QS-RDS01.qs.lab
RDPublishing Untrusted 10/30/2028 20:45:38 CN=QS-RDS01.qs.lab
 RDWebAccess Untrusted 10/30/2028 20:45:38 CN=QS-RDS01.qs.lab
   RDGateway Unknown

RDPublishing is the certificate that signs the .rdp files RD Web hands out (the downloaded file carried this signature), and RDRedirector is the broker’s single sign-on certificate. With the new certificate on 443, the same Chromium request returned 200 and landed on the RD Web sign-in page. Clients still need to trust it, which the next section handles with one import. Once Set-RDCertificate has run, delete C:\lab\rds.pfx, because it holds the private key and the roles no longer need the file. Keep rds.cer, which is public.

Server Manager picks all of this up too. Open Remote Desktop Services in the left pane, and the Overview shows RD Web Access, RD Licensing and the broker on QS-RDS01, with RD Gateway still offered as an add.

Server Manager Remote Desktop Services overview on Windows Server 2025 with RD Web Access, RD Licensing and RD Connection Broker on QS-RDS01

The Collections node under it lists Office Desktops, so the collection you built in PowerShell is there to manage from the GUI as well. That is handy for the settings you touch once, such as session time limits, where a dialog is quicker than looking up parameter names.

Connect from Windows 11

Your client needs to trust the RDS certificate before the RDP publisher check can pass. Trusting a self-signed leaf certificate as a root is a lab shortcut, and a production deployment avoids it with a CA-issued certificate. For a single test machine, create C:\lab on the client, copy rds.cer into it and import it from an elevated PowerShell.

New-Item -ItemType Directory -Force C:\lab | Out-Null
Import-Certificate -FilePath C:\lab\rds.cer -CertStoreLocation Cert:\LocalMachine\Root

Open https://QS-RDS01.qs.lab/RDWeb in a browser and log in as a member of RDS Users, here QS\joshua. The lab drove this page from a Chromium browser on the same network and then opened the downloaded file on the Windows 11 client, where joshua was signed in. The Work Resources page lists every collection that user is allowed to open.

RD Web Access page on Windows Server 2025 showing the Office Desktops session collection

Clicking Office Desktops downloads a signed .rdp file. Two of its lines tell you how the connection reaches the collection, full address:s:QS-RDS01.QS.LAB and loadbalanceinfo:s:tsv://MS Terminal Services Plugin.1.Office_Desktops. The second one names the collection for the broker, so hand your users this file (or the RD Web link) rather than a bare server name.

Opening the file on Windows 11 brings up a warning the first time, with OK greyed out until you accept it.

Windows 11 24H2 Opening Remote Desktop Connection warning with the allow RDP files checkbox and the OK button
  1. 1I understand and allow RDP files
  2. 2OK
  1. Tick I understand and allow RDP files to open on this device for your account.
  2. Click OK, which only becomes active after the box is ticked.

The second prompt is the publisher check. Because the client trusts the certificate that signed the file, it names QS-RDS01.qs.lab as the publisher instead of an unknown one. Every local resource redirection is unticked by default, so tick Clipboard or Drives here if your users need them, then click Connect.

Remote Desktop Connection security warning on Windows 11 verifying publisher QS-RDS01.qs.lab with all device redirections unticked

The session opens full screen on QS-RDS01.QS.LAB, with the connection bar at the top naming the host.

Full screen RDS session desktop on QS-RDS01.QS.LAB opened from a Windows 11 client through the Office Desktops collection

A desktop on screen proves the RDP side works. To prove the broker did its job, check from the server that the session sits in the collection and not just on the host.

Get-RDUserSession -ConnectionBroker QS-RDS01.qs.lab | Format-Table CollectionName,DomainName,UserName,HostServer,SessionState -AutoSize

You should see a joshua row for the Windows 11 session. The Administrator row is the console logon on the RDS host itself, which also shows up in the collection.

CollectionName  DomainName UserName      HostServer      SessionState
--------------  ---------- --------      ----------      ------------
Office Desktops QS         Administrator QS-RDS01.qs.lab STATE_ACTIVE
Office Desktops QS         joshua        QS-RDS01.qs.lab STATE_ACTIVE

If all you need is admin access to a single server, you don’t need any of this. Enabling Remote Desktop on Windows Server gives you two admin sessions without RDS or CALs, and that is the right tool for managing servers rather than hosting desktops for staff.

Fix the RDS deployment errors

Two of these stopped the deployment before it installed anything, and the third left RD Web unreachable in a Chromium browser. The messages are verbatim from the lab, and the last two entries cover errors you may meet that the lab did not.

“Validation failed for the “RD Connection Broker” parameter”

You get this message when you run New-RDSessionDeployment as the local QS-RDS01\Administrator on a domain-joined server.

Validation failed for the "RD Connection Broker" parameter.
QS-RDS01.qs.lab   Unable to connect to the server by using Windows PowerShell remoting. Verify that you can connect to the server.

Remoting itself was fine. The cmdlet checks each role server by its domain FQDN using the caller’s credentials, and a local account isn’t something the domain recognizes, even when that FQDN is the same machine. Signing in as QS\Administrator and running the same command got past this check.

“You cannot restart the local server”

Running as QS\Administrator got past the broker check, then failed on the next one after two minutes.

Validation failed for the "RD Session Host" parameter.
QS-RDS01.qs.lab   You cannot restart the local server.

Installing RD Session Host requires a reboot, and the cmdlet won’t reboot the machine it is running on. Install RDS-RD-Server and restart first, as in the step above. After the pre-install, the RebootPending key existed under Component Based Servicing until the restart, so testing for it is a quick way to see whether a reboot is still owed.

Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending"

It returned True right after the role install and False once the server came back, which is the point to rerun the deployment.

ERR_SSL_KEY_USAGE_INCOMPATIBLE on /RDWeb

The certificate IIS gets during the deployment carries Key Encipherment without Digital Signature, and current Chromium rejects it whenever the TLS handshake needs the certificate to sign, as the usual ECDHE_RSA key exchange does. Telling the test browser to ignore certificate errors didn’t get past it either, because this isn’t a trust error. Replace it with Set-RDCertificate as shown above. If you check the served certificate with openssl s_client, it should show Digital Signature, Key Encipherment under X509v3 Key Usage.

Failed to join the Connection Broker

This lab never produced the “failed to join the connection broker” error, so there is no tested fix for it here. What the lab did show is that both validation failures above stop the deployment before the broker exists, so check the account you are signed in as and whether a reboot is pending before you chase anything deeper. Leftover state from an earlier attempt is worth ruling out too, and Get-RDServer shows what the broker already has registered.

RDP hangs at “Please wait for the Remote Desktop Configuration”

This one is history now. Microsoft’s Windows Server 2025 release health page lists an issue opened on 11 September 2026. After the September security update KB5122871, Remote Desktop Services could stop responding. RDP connections failed after several minutes, sign-ins had problems, and servers could hang at that message. It was resolved on 14 September by the out-of-band update KB5129235 and later cumulative updates. The lab’s Session Host was on build 26100.32230 from KB5073379, which predates KB5122871, so the hang never showed up here. If a server still has the September update without the fix, install the latest cumulative update before blaming the RDS config for a black or frozen session.

RDS cmdlet reference card

Here is every cmdlet that built this deployment, in the order it ran, with the time it took on the 2 vCPU lab guest where it was measured.

TaskCmdletLab time
Pre-install Session HostInstall-WindowsFeature RDS-RD-ServerPlus one reboot
Create the deploymentNew-RDSessionDeployment601 s
List role serversGet-RDServerNot timed
Create a collectionNew-RDSessionCollection15 s
Limit who sees itSet-RDSessionCollectionConfiguration -UserGroupNot timed
Add licensingAdd-RDServer -Role RDS-LICENSING131 s
Set CAL modeSet-RDLicenseConfiguration -Mode PerUserNot timed
Replace certificatesSet-RDCertificate -Role RDWebAccessUnder a minute for all three
See who is connectedGet-RDUserSessionNot timed

If your users sit outside the LAN, your next step is RD Gateway, which wraps RDP in HTTPS on 443 so 3389 never has to face the internet.

Keep reading

Create a Bootable Windows 11 USB and Install Windows 11 Windows Create a Bootable Windows 11 USB and Install Windows 11 Set Up a Samba Share on Windows 11 and Access It from Linux Networking Set Up a Samba Share on Windows 11 and Access It from Linux Create Disk Partitions in Windows Using diskpart Windows Create Disk Partitions in Windows Using diskpart CompTIA A+ Practice Questions for 220-1201 and 220-1202 Networking CompTIA A+ Practice Questions for 220-1201 and 220-1202 Windows Event IDs Cheat Sheet: Security and System Logs (PDF) Cheat Sheets Windows Event IDs Cheat Sheet: Security and System Logs (PDF) Configuring AlwaysOn Availability Groups in SQL Server 2022 Databases Configuring AlwaysOn Availability Groups in SQL Server 2022

Leave a Comment

Press ESC to close