Add-PrinterDriver on Windows Server 2012

This question is in addition to the following thread which already was marked as answered:

http://social.technet.microsoft.com/Forums/windowsserver/en-US/7a2db68a-659d-4ba2-b732-52b55b9688cd/addprinterdriver-infpath?forum=winserverpowershell

Here's what I'm currently trying to achieve:

We're currently using 10 printserver appliances for publishing about 1k printer queues to the AD and making them available to the users. Sometime this year those printserver appliances will have to be replaced by a Windows printserver, because of ongoing problems we regularly encounter with the current solution.

I tried to create a PowerShell script to migrate all the printers from the appliances to the Windows server, which checks for published queues in the AD, installs the needed drivers on the Windows server and installs the printers as a last step.

I was rather happy to see that new Cmdlets were introduced with Server 2012 which seemed to be pointed exactly at what I wanted to achieve.

Here's my current problem:

Using Add-PrinterDriver didn't work as it should for a majority of our printers as their drivers are not available in the Windows driver store by default.

Using Add-WindowsDriver didn't work as it only allows drivers to be installed into offline images, not into the currently running system.

Using pnputil to add the driver to the driver store worked great, although it feels like a break in technology usage when calling this from PowerShell.

But, to get down to the core problem, Add-PrinterDriver doesn't seem to recognize a x86 driver in the driver store even if it was successfully added by pnputil. Here's an example with a HP PostScript universal printer driver (commands were taken from the script I mentioned earlier):
PS C:\Windows\system32> pnputil -a $AvailableX64Drivers[$Printer.driverName].Driver
Microsoft PnP Utility

Processing inf :            hpcu155v.inf
Driver package added successfully.
Published name :            oem11.inf


Total attempted:              1
Number successfully imported: 1


PS C:\Windows\system32> pnputil -a $AvailableX86Drivers[$Printer.driverName].Driver
Microsoft PnP Utility

Processing inf :            hpcu155d.inf
Driver package added successfully.
Published name :            oem16.inf


Total attempted:              1
Number successfully imported: 1


PS C:\Windows\system32> Add-PrinterDriver $Printer.driverName -PrinterEnvironment "Windows x64" -ErrorAction Stop

PS C:\Windows\system32> Add-PrinterDriver $Printer.driverName -PrinterEnvironment "Windows NT x86" -ErrorAction Stop
Add-PrinterDriver : The specified driver does not exist in the driver store.
At line:1 char:1
+ Add-PrinterDriver $Printer.driverName -PrinterEnvironment "Windows NT x86" -Erro ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (MSFT_PrinterDriver:ROOT/StandardCimv2/MSFT_PrinterDriver) [Add-PrinterDriver], CimException
    + FullyQualifiedErrorId : HRESULT 0x80070705,Add-PrinterDriver
 

PS C:\Windows\system32> 

The file hpcu155v.inf is confirmed to be the correct x64 driver and the file hpcu155d.inf is confirmed to be the correct x86 driver. Both work correctly when installing them using the printer driver wizard.

  • Edited by DMoenks Friday, January 10, 2014 7:16 AM
January 10th, 2014 7:00am

Now I've tried it with an even simpler driver for a label printer without complex file/folder structure and just one *.inf file, so there's no cross-linking between files.

Looks just like the same result:

PS C:\Windows\system32> pnputil -a "C:\Users\printer-admin\Desktop\Driver\Phoenix Contact\phoenix.inf"
Microsoft PnP Utility

Processing inf :            phoenix.inf
Driver package added successfully.
Published name :            oem21.inf


Total attempted:              1
Number successfully imported: 1


PS C:\Windows\system32> Add-PrinterDriver "THERMOMARK ROLL" -PrinterEnvironment "Windows x64"

PS C:\Windows\system32> Add-PrinterDriver "THERMOMARK ROLL" -PrinterEnvironment "Windows NT x86"
Add-PrinterDriver : The specified driver does not exist in the driver store.
At line:1 char:1
+ Add-PrinterDriver "THERMOMARK ROLL" -PrinterEnvironment "Windows NT x86"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (MSFT_PrinterDriver:ROOT/StandardCimv2/MSFT_PrinterDriver) [Add-PrinterDriver], CimException
    + FullyQualifiedErrorId : HRESULT 0x80070705,Add-PrinterDriver
 

PS C:\Windows\system32> 

  • Edited by DMoenks Monday, February 24, 2014 1:20 PM
Free Windows Admin Tool Kit Click here and download it now
February 24th, 2014 1:19pm

This thread is about Add-PrinterDriver on Windows Server 2012. Providing links to install on a 2008 print server are not helpful since 2012 is soooo different!

I have an hp printer, the universal driver comes as type 3, no type 4 available.  2012 R2 server won't install the 32 bit driver for win 7 machines but installed the 64 bit without problems.  Logs only show login errors as my installation freezes.

I can't find anything relevant to installing type 3, 32 bit drivers on Windows Server 2012.

I've installed the print server role on the server. Whether I use the tool or use properties on the printer udner control panel, I get the same problem.  I select additional drivers, check of x86, browse to where I've already uncompressed the driver files from hp for 32 bit but that window freezes and log shows "an account failed to log on" and then Application log shows this

The program mmc.exe version 6.3.9600.17415 stopped interacting with Windows and was closed. To see if more information about the problem is available, check the problem history in the Action Center control panel.

Process ID: b64

Start Time: 01d0d453fe804eff

Termination Time: 31

Application Path: C:\Windows\system32\mmc.exe

Report Id: 31c7a367-404e-11e5-80bf-000c29274717

Faulting package full name:

Faulting package-relative application ID:

or this:

The program printui.exe version 6.3.9600.17415 stopped interacting with Windows and was closed. To see if more information about the problem is available, check the problem history in the Action Center control panel.

Process ID: e4

Start Time: 01d0d451743fe6ab

Termination Time: 15

Application Path: C:\Windows\system32\printui.exe

Report Id: f8a13922-4044-11e5-80bf-000c29274717

Faulting package full name:

Faulting package-relative application ID:

August 11th, 2015 1:31pm

You cannot use 2 bit drivers on 2012.  Also your question is posted in the wrong place.  Please post you issues in the vendor forum for you pronter of call tech support for your printer.

Free Windows Admin Tool Kit Click here and download it now
August 11th, 2015 2:40pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics