Printers

Default Printer At First Logon via Group Policy

Deploying a network printer via Group Policy is pretty easy. In Group Policy Management Editor, you go to User Configuration > Preferences > Control Panel Settings > Printers and right click to create a new Shared Printer. Configure the options which are pretty straight forward.

Something doesn’t go right though, if you use the option ‘set this printer as the default printer’. The printer won’t actually be set as default for the first login. As it’s set to Update though, this will get fixed next time Group Policy runs.

However, if you have the Action set to ‘Create’, it only gets one chance to set the default printer – at the time of creation. That fails, and it doesn’t get a chance to set the default printer again.

Why does it fail to set the default printer at first logon? You’ll see an event viewer application error like this:

The user ‘HP Printer’ preference item in the ‘Define Printers {XXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}’ Group Policy object did not apply because it failed with error code ‘0x80070709 The printer name is invalid.’ This error was suppressed.

There’s a clear Microsoft Support Article that explains why – in summary, Windows isn’t ready yet to change something on the printer between the time it creates the printer, and then tries to make it default as they’re two separate actions.

However, we can work around this by deploying a registry entry that sets the default printer. This 11 year old article is still correct in that it shows the registry value to change:

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows

REG_SZ - Device
Value - \\adamfowlerit\printer,winspool,Ne04:e

Setting this via registry as an ‘Apply once and do not reapply’ with any other logic matching your printer deployment policy, should end up with the printer as a default on first logon.

This is a problem that’s been around for many years, but the first time I’ve hit it!

Also, if you’re wondering what the ‘Ne04’ part means, it seems to be some sort of counter which goes up for each time you install a printer.

Deploying Printers In Windows 10

Printers are pretty easy to deploy via Group Policy. It’s easy to configure a Group Policy Preference to deploy a printer, but there’s a few gotchas that may prevent the printer from actually getting installed client side.

The first thing to check is Event Viewer > Applications. If Group Policy attempts to add a printer but fails, it should be logged as a warning and give an idea on what the problem is. If you’re stuck – enable Group Policy Preferences Logging and Tracing for Printers, and see if you get more data.

For Windows 10, depending at what patch level you’re at, and what drivers the print server has, and if those drivers are packaged or not you’ll probably have to enable more policies to make printers deploy. If you don’t, you may see this error in Event Viewer: “Group Policy Object did not apply because it failed with error code ‘0x80070bcb The specified printer driver was not found on the system and needs to be downloaded.’ ”

There’s a lot of information out there on this topic – but generally, the main reason a printer won’t automatically install is because of UAC. If you try to manually install one of these printers, you’ll get the ‘Do you trust this printer’ warning, and even after continuing on that, the install may fail.

There’s two Group Policies to configure to get around this, which I found blogged at Systemcenterdudes so please read their post – but you need to enable these two policies:

Computer Configuration > Policies > Administrative Templates > Printers – Package Point and Print

Computer Configuration > Policies > Administrative Templates > Printers – Point and Print 

In both of the policy settings, you may need to specifiy your print servers. It wouldn’t work for me until I did – and it’s a better security approach to do this anyway.

Once that was done, printers were then able to be installed automatically via Group Policy. There’s some other ways I’ve read to change how the drivers work, push out registry fixes etc – but to me this seems the simplest and safest approach (assuming it works for you too!).

If you’ve had a different experience or the above doesn’t work, please share!

Network Printers keep disappearing from Directory Services

Hi,

Just had an issue where some new print servers were commissioned – Windows Server 2012, with local printers installed connected to IP addresses of network based printers, and then shared and listed in the directory:

list in directoryPretty common stuff. There’s even a Technet article on how to do this http://technet.microsoft.com/en-us/library/cc737008(v=ws.10).aspx

Our problem was that after a few days, every single printer from a server would drop off the directory. We could get them back by removing and adding the tick for ‘List in the directory’ and waiting 5 minutes, but that’s a rather painful and temporary fix. You can also restart the Print Spooler service and wait as it will republish the printers, but that’s non-permanent resolution.

Doing a bit of research (yes, googling) I found an old thread here http://www.techsupportforum.com/forums/f103/solved-network-printers-disappearing-from-directory-161202.html and a similar Microsoft support article here http://support.microsoft.com/kb/246906/en-us that both indicated the easist way is to disable Printer Pruner on each Print Server via Group Policy:

pruning

As per the screenshot, the three settings you want to disable are:

Directory pruning interval
Directory pruning priority
Directory pruning retry (ok this doesn’t really matter if the top two are disabled, but no harm)

This will stop the server doing any sort of pruning – and hey, if you want to remove a printer from the directory, you remove the tickbox.

As a side note, if you’re not already using Print Management – start using it. Step by Step guide from Technet here: http://technet.microsoft.com/en-us/library/cc753109(v=ws.10).aspx

Why use Print Management? It lets you centrally manage all Network Printers, their drivers, and has a bunch of handy options like deploying to Group Policy. Trust me, it’s worth having a look! You just need to add the “Print Services” role to a server, then add the feature “Print Services Tools”.