Default Printer Resets on Remote Desktop Session Hosts
This guide addresses a common issue where users' default printer settings reset after logging off Remote Desktop Session Host (RDSH) servers when printers are deployed via Print Management.
Problem Description
When printers are deployed to RDSH servers using the Print Management console (newer method), users experience the following issue:
- User sets their preferred default printer
- User logs off the RDSH server
- Upon next logon, the default printer has changed or reset
This occurs because printers deployed through Print Management are configured to be removed when users log off by default.
Root Cause
Print Management deploys printers with the RemovePrintersAtLogoff behavior enabled by default. This causes the system to:
- Remove client-side rendered printers when users log off
- Reset default printer preferences on next logon
- Require users to reconfigure their default printer each session
Solution Overview
Disable the automatic removal of printers at logoff by configuring a registry value on the RDSH servers. This can be applied:
- Manually via PowerShell script on each RDSH server
- Centrally via Group Policy Object (GPO)
Prerequisites
- Administrative access to RDSH servers
- PowerShell with administrator privileges
- (Optional) Group Policy management access for centralized deployment
Background: Printer Deployment Methods
Legacy Method (GPO)
- Printers deployed directly through Group Policy Preferences
- Default printer specified within the GPO
- Less commonly used in modern environments
Current Method (Print Management)
- Printers deployed through Print Management console
- More flexible and centralized management
- Default behavior: Remove printers at logoff
Registry Solution
Registry Details
| Setting | Value |
|---|---|
| Path | HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider |
| Value Name | RemovePrintersAtLogoff |
| Type | DWORD |
| Data | 0 (Disabled) |
PowerShell Script
Run this script with administrator privileges on each RDSH server:
#Requires -RunAsAdministrator
$RegistryPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider"
$ValueName = "RemovePrintersAtLogoff"
$ValueType = "DWord"
$ValueData = 0
Write-Output "Attempting to configure registry key: $($RegistryPath)"
Write-Output "Setting value: $($ValueName) = $($ValueData) (Type: $($ValueType))"
if (-not (Test-Path -Path $RegistryPath)) {
Write-Output "Registry path does not exist. Creating path: $($RegistryPath)"
try {
New-Item -Path $RegistryPath -Force -ErrorAction Stop | Out-Null
Write-Output "Successfully created registry path."
}
catch {
Write-Error "Failed to create registry path: $($RegistryPath). Error: $($_.Exception.Message)"
exit 1
}
}
else {
Write-Output "Registry path already exists."
}
try {
New-ItemProperty -Path $RegistryPath -Name $ValueName -Value $ValueData -PropertyType $ValueType -Force -ErrorAction Stop | Out-Null
Write-Output "Successfully set registry value '$($ValueName)' to $($ValueData)."
}
catch {
Write-Error "Failed to set registry value '$($ValueName)'. Error: $($_.Exception.Message)"
exit 1
}
Write-Output "Registry configuration complete."
Manual Registry Edit
If you prefer to edit the registry manually:
- Open Registry Editor (
regedit.exe) as administrator - Navigate to:
- Create a new DWORD (32-bit) value named
RemovePrintersAtLogoff - Set the value to
0 - Close Registry Editor
- No reboot required (takes effect on next user logon)
Deploying via Group Policy
For centralized deployment across multiple RDSH servers:
Step 1: Create GPO
- Open Group Policy Management Console
- Create a new GPO or edit an existing one targeting RDSH servers
- Name it appropriately (e.g., "RDSH - Preserve Printer Settings")
Step 2: Configure Registry Preference
- Navigate to: Computer Configuration → Preferences → Windows Settings → Registry
- Right-click → New → Registry Item
- Configure the registry item:
- Action: Update
- Hive: HKEY_LOCAL_MACHINE
- Key Path:
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider - Value name:
RemovePrintersAtLogoff - Value type: REG_DWORD
- Value data:
0 - Click OK
Step 3: Link and Apply
- Link the GPO to the OU containing your RDSH servers
- Run
gpupdate /forceon RDSH servers or wait for next policy refresh - Verify with:
gpresult /h report.html
Verification
Check Registry Value
# Verify the registry value is set correctly
Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider" -Name "RemovePrintersAtLogoff"
Expected output:
Test User Experience
- Log into RDSH server as a test user
- Set a default printer
- Log off
- Log back in
- Verify the default printer setting persists
Troubleshooting
Default Printer Still Resets
Solutions:
- Verify the registry value is set to 0
- Check that the registry path is correct
- Ensure user has logged off and back on after registry change
- Confirm printers are deployed via Print Management (not legacy GPO method)
- Check for conflicting GPO settings
Registry Value Not Applied via GPO
Solutions:
- Verify GPO is linked to correct OU
- Check GPO scope and filtering
- Run gpresult /h report.html to verify GPO application
- Ensure computer account is not filtered out
- Check for WMI filter restrictions
Script Fails to Run
Solutions:
- Run PowerShell as administrator
- Check execution policy: Set-ExecutionPolicy RemoteSigned -Scope Process
- Verify no typos in registry path
- Review error messages for specific failures
Printers Not Appearing
Problem: After applying fix, printers don't appear at all.
Solutions: - Check Print Spooler service is running - Verify Print Management deployment is working - Review RDS printer redirection settings - Check client-side printer settings
Impact and Considerations
Benefits
- Users' default printer preferences persist across sessions
- Reduced help desk calls about printer settings
- Improved user experience on RDSH servers
- No reboot required
Considerations
- Printers will remain installed after logoff (uses slightly more disk space)
- May affect printer management if you rely on automatic cleanup
- Consider impact on shared RDSH servers with many users
- Monitor disk space usage if deploying to high-user-count servers
Related Documentation
- Remote Desktop Services Printer Redirection
- Deploy Printers Using Group Policy
- Print Management Overview
This guide applies to Windows Server Remote Desktop Session Hosts with printers deployed via Print Management.