Remote Desktop Services (RDS) is a critical feature in Windows Server that allows users to remotely access desktops and applications. By default, RDS provides a 120-day trial period before requiring proper licensing. However, once the trial expires, users cannot connect via RDS unless licenses are applied.
For testing or temporary environments, you may need to reset the trial period to extend functionality. This guide explains how to reset the 120-day trial period manually and provides a script for automation. Note: This process should only be used in non-production environments and must comply with Microsoft’s licensing terms.
Why Reset the RDS Trial Period?
The 120-day trial period is often used for:
- Testing and evaluation of Remote Desktop Services.
- Temporary setups for development environments.
- Avoiding interruptions during licensing transitions.
Resetting the trial period is not a replacement for purchasing licenses. Always ensure compliance with Microsoft licensing policies for production environments.
Step-by-Step Guide to Reset the 120-Day Trial Period
Important Warning:
Resetting the trial period involves modifying system files and registry settings. Proceed with caution and back up your server before making changes.
Step 1: Stop the Remote Desktop Licensing Service
- Open Services on your Windows Server.
- Press
Win + R
, typeservices.msc
, and hit Enter.
- Press
- Locate the Remote Desktop Licensing service.
- Right-click on the service and select Stop.
Step 2: Delete the Licensing Grace Period Key
- Open the Registry Editor:
- Press
Win + R
, typeregedit
, and hit Enter.
- Press
- Navigate to the following registry path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TermService\Parameters
- Locate the GracePeriod key.
- Delete the GracePeriod key.Note:
- If the system prevents you from deleting the key, you may need to take ownership of the registry entry:
- Right-click on the GracePeriod key, select Permissions, and click Advanced.
- Change the ownership to your user account or Administrator.
- Grant Full Control permissions to delete the key.
- If the system prevents you from deleting the key, you may need to take ownership of the registry entry:
Step 3: Restart the Remote Desktop Licensing Service
- Return to Services.
- Locate the Remote Desktop Licensing service.
- Right-click on the service and select Start.
Step 4: Verify the Trial Reset
- Open the Remote Desktop Licensing Manager.
- Confirm that the trial period has been reset to 120 days.
- Test the RDS connection to ensure it is functioning correctly.
Automating the Reset with a Script
If you frequently need to reset the RDS trial period for testing environments, you can use the following PowerShell script to automate the process. This script stops the licensing service, deletes the GracePeriod registry key, and restarts the service.
PowerShell Script to Reset the 120-Day Trial
# Stop Remote Desktop Licensing Service
Write-Host "Stopping Remote Desktop Licensing service..." -ForegroundColor Yellow
Stop-Service -Name TermService -Force
Start-Sleep -Seconds 5
# Define the GracePeriod registry path
$GracePeriodPath = "HKLM:\SYSTEM\CurrentControlSet\Services\TermService\Parameters\GracePeriod"
# Check if the GracePeriod key exists
if (Test-Path $GracePeriodPath) {
Write-Host "GracePeriod key found. Taking ownership..." -ForegroundColor Yellow
# Take ownership of the GracePeriod key
Invoke-Expression "cmd.exe /c takeown /f $GracePeriodPath /a /r /d y"
Start-Sleep -Seconds 2
# Grant full control to the Administrator group
Invoke-Expression "cmd.exe /c icacls $GracePeriodPath /grant administrators:F /t /c"
Start-Sleep -Seconds 2
# Delete the GracePeriod key
Write-Host "Deleting GracePeriod key..." -ForegroundColor Yellow
Remove-Item -Path $GracePeriodPath -Recurse -Force
} else {
Write-Host "GracePeriod key not found. Skipping deletion." -ForegroundColor Green
}
# Restart Remote Desktop Licensing Service
Write-Host "Restarting Remote Desktop Licensing service..." -ForegroundColor Yellow
Start-Service -Name TermService
Start-Sleep -Seconds 5
Write-Host "RDS trial period reset successfully!" -ForegroundColor Green
How to Use the Script
- Open PowerShell as an Administrator.
- Copy and paste the script into the PowerShell console or save it as a
.ps1
file. - Run the script.
- Verify that the trial period has been reset by accessing the Remote Desktop Licensing Manager.
Important Considerations
- For Testing Only: This process is intended for non-production environments. Always purchase and apply the appropriate RDS Client Access Licenses (CALs) for production use.
- Compliance: Ensure you comply with Microsoft’s licensing policies. Misuse of this process may violate licensing agreements.
- Backup: Always back up your server and registry before making changes to avoid accidental data loss or corruption.
Troubleshooting
If the trial reset does not work:
- Ensure you have administrative privileges.
- Verify that the GracePeriod key was successfully deleted.
- Restart the server and recheck the trial status.
- If the script fails, manually follow the steps in the guide.
Conclusion
Resetting the 120-day trial period for Remote Desktop Services can be a helpful solution for testing or temporary use in non-production environments. Whether you choose to reset the trial manually or automate the process with a script, ensure you follow the steps carefully and remain compliant with licensing terms. For production environments, always use properly licensed RDS CALs to ensure uninterrupted service and compliance with Microsoft policies.