Default printer keeps changing on the terminal server: causes and fixes
Users log on to the Remote Desktop server and print to the wrong printer – again. Four things move the default printer in an RDP session. Here is what each one does and how to stop it.
On this page
The symptom
On a Remote Desktop Session Host (terminal server) the default printer is set correctly – by Group Policy, a logon script or the user – and a few seconds later it is something else: the home-office printer of the client PC, the PDF printer or whatever was used last. After the next logon or reconnect the game starts again.
This is not one bug but up to four independent mechanisms, and they act at different times. That is why a single fix rarely holds.
Cause 1: “Let Windows manage my default printer”
Since Windows 10 / Windows Server 2016, Windows can make the printer used last the default printer. On many servers this option is on for every new user profile. As soon as a user prints once to another printer, that printer becomes the default.
Fix: turn the option off for all users – via Group Policy (Turn off Windows default printer management) or the registry value LegacyDefaultPrinterMode = 1. Step by step: Turn off “Let Windows manage my default printer”.
Cause 2: RDP printer redirection
With printer redirection the printers of the client PC are created in the session – for example Brother HL-L2350DW (redirected 3). By default, Remote Desktop Services also makes the client’s default printer the session’s default printer. The tricky part: redirected printers arrive a few seconds after logon, after Group Policy and logon scripts have already run. Whatever they set is overwritten.
Fix: enable the policy Do not set default client printer to be default printer in a session – or restrict or disable redirection. Details and trade-offs: Redirected printer becomes the default printer.
Cause 3: programs and users
Some applications set their own default printer, and users change it in the settings or the print dialog. On a shared server this often happens by accident.
Fix: only by checking the default printer again during the session. A logon script runs once and does not notice the change. WePrintEasy can optionally watch the default printer during the whole session and put it back (default: every 30 seconds). If users should be allowed to choose their own default printer, leave this monitoring off.
Cause 4: the network printer is not connected yet
If the assigned printer \\printserver\share is not connected in the session when the default is set – because the connection is still being created or failed – setting it as default fails silently and Windows keeps or picks another printer.
Fix: pre-install the printer drivers on the session hosts (since the PrintNightmare updates standard users may not install drivers), check that the print server is reachable at logon and set the default only once the connection exists.
Why a one-time setting is not enough
All four causes have one thing in common: they act after the moment in which Group Policy or a logon script sets the printer – or again later in the session. On top of that, Windows stores the default printer in RDP sessions per session. Tools that only write the classic registry value or use WScript.Network do not always change the printer the session really uses. More on this in How it works.
A reliable solution therefore has to
- set the printer at logon and at every reconnect,
- check again for a while after logon until the redirected printers have arrived,
- optionally keep watching during the session, and
- use the Windows API (
SetDefaultPrinter) that sets the session’s effective default printer.
Checklist with built-in tools
| Step | Where |
|---|---|
| Turn off “Let Windows manage my default printer” | User policy Turn off Windows default printer management |
| Client default printer must not become session default | Computer policy Do not set default client printer to be default printer in a session |
| Pre-install printer drivers | Session hosts / print server |
| Map printer and set as default per user or group | Group Policy preferences with item-level targeting |
This covers causes 1 and 2 and much of 4. What remains are the timing gaps after logon and on reconnect, cause 3 and the effort of maintaining one preference item per group. A comparison of the options: GPO vs. logon script vs. WePrintEasy.
The WePrintEasy approach
WePrintEasy is a free, open-source tool for exactly this problem. You assign a printer to each AD user or group; a small agent starts in every session at logon and reconnect and
- turns off “Let Windows manage my default printer” for the user,
- connects the assigned network printer if it is missing,
- checks every 3 seconds for 2 minutes after logon and resets the default printer if a redirected printer took over,
- optionally keeps watching during the whole session, and
- logs every correction, so you can see what changed the printer.
“Enforce now (live)” in the admin console checks a user on a specific terminal server step by step and shows what is wrong – see Troubleshooting.
Fixed default printers without scripts WePrintEasy sets the assigned printer at every logon and reconnect and keeps it in place – per AD user or group. Free · MIT licence · See all features
Download WePrintEasy 1.0.13