none
Add shared printer with Powershell - driver problem RRS feed

  • Question

  • Hi guys, 

    I'm creating a script that is used to install printers for a specific office. The script is quite simple and I run this command to install the actuall printer: 

    Add-Printer -ConnectionName $printer

    However it fails on a fresh installed PC with no printer connections before and I get this error message: 
    Add-Printer : The driver needed to connect to this print share cannot be retrieved from the server and must be manually installed. 

    When I install the printer from the GUI on the same computer, I have to answer that I trust the printer to install the driver. 

    Why doesn't it work from Powershell? Any ideas? 


    Monday, March 5, 2018 1:02 PM

Answers

  • This is still not a scripting issue.  It is about knowing how to deploy printers and why a shared printer cannot install a driver.  If the server does not have a matching driver then you will get that message.  Fix the spooler.

    Also users will not have permissions to install drivers.  Group Policy can overcome this. 

    Post in the Print/Fax forum for help.


    \_(ツ)_/

    • Marked as answer by sweknox Monday, March 5, 2018 3:19 PM
    Monday, March 5, 2018 3:10 PM

All replies

  • You need to correctly set up the print server.  Printer deployment should be done with Group Policy.

    Add-Printer is designed for ad-hoc use in a script or for installing a locally attached printer.  It is most used to manage workgroup systems.  In a domain we would use aa print server and GP to deploy printers. 

    To get help and to learn how to deploy printers correctly in Windows post in the Windows Print/Fax Forum.


    \_(ツ)_/

    Monday, March 5, 2018 1:45 PM
  • Printers are deployed with Group Policy, but as we have users moving between offices they need a easy way to connect to a specific office printers. Therefore I thought a script would be good enough for that purpose. 

    It installs some of the printers, but not all of them and I cant figure out why as it works from the Windows GUI, but not Powershell. 

    Monday, March 5, 2018 2:40 PM
  • This is still not a scripting issue.  It is about knowing how to deploy printers and why a shared printer cannot install a driver.  If the server does not have a matching driver then you will get that message.  Fix the spooler.

    Also users will not have permissions to install drivers.  Group Policy can overcome this. 

    Post in the Print/Fax forum for help.


    \_(ツ)_/

    • Marked as answer by sweknox Monday, March 5, 2018 3:19 PM
    Monday, March 5, 2018 3:10 PM
  • Ok, thanks for your help! 

    Monday, March 5, 2018 3:19 PM