Troubleshooting Set-RDSessionCollectionConfiguration in PowerShell: RDSService Doesn't Exist
The Remote Desktop Services (RDS) in Windows Server is a powerful tool that enables users to access their desktops and applications remotely. The Set-RDSessionCollectionConfiguration cmdlet is a PowerShell cmdlet used to configure various settings for an RD Session Collection. However, sometimes you may encounter an error stating that the RDSService doesn't exist, making it impossible to run the Set-RDSessionCollectionConfiguration cmdlet. In this article, we will discuss the possible causes and solutions for this issue.
Prerequisites
Before we dive into the troubleshooting steps, let's ensure that the following prerequisites are met:
- Windows Server 2012 R2 or later versions
- Remote Desktop Services Role installed
- PowerShell 5.1 or later versions
Cause 1: RDS Service Not Running
The first possible cause for the "RDSService doesn't exist" error is that the RDS service is not running. To check the status of the RDS service, follow these steps:
- Press Win + R to open the Run dialog box.
- Type
services.mscand press Enter. - Locate the "Remote Desktop Services" service in the list and check its status.
If the service is not running, start it by right-clicking on the service and selecting "Start."
Cause 2: Incorrect Configuration
Another possible cause for the "RDSService doesn't exist" error is an incorrect configuration. This could be due to a missing or incorrect value in the RDS configuration file. To check the RDS configuration file, follow these steps:
- Press Win + R to open the Run dialog box.
- Type
rdpconfigand press Enter. - Click on the "Select Users or Groups" tab and click "Add."
- Enter the user or group name and click "Check Names."
- If the name is valid, click "OK" to add the user or group.
- Click "OK" to close the RDP configuration window.
- Open PowerShell with administrative privileges and run the following command:
Get-RDSessionCollectionConfiguration -Name "YourSessionCollectionName" -ErrorAction SilentlyContinue
If the command returns an error, check the RDS configuration file for any errors or missing values.
Cause 3: Firewall Settings
The third possible cause for the "RDSService doesn't exist" error is firewall settings. Ensure that the required ports for RDS are open in the firewall. The default RDS ports are:
- TCP 3389 for Remote Desktop Protocol (RDP)
- TCP 1494 for RemoteFX
To check the current firewall settings, follow these steps:
- Press Win + X and select "Windows Defender Firewall with Advanced Security."
- Click on "Inbound Rules" and search for the rules with the ports mentioned above.
- Ensure that the rules are enabled.
In conclusion, the "RDSService doesn't exist" error can be caused by various reasons, including the RDS service not running, incorrect configuration, or firewall settings. By following the troubleshooting steps outlined in this article, you should be able to resolve the issue and successfully run the Set-RDSessionCollectionConfiguration cmdlet.
References