Create Printer Powershell


Am having major difficulties getting a script I am working on to to successfully create a Printer. I have so far managed to get the Printer Ports created successfully but it always errors with the Printer creation.

The CSV file where it is picking the information up from looks like this:

The error message I get is this:

The code I am using is this:

Does anyone have any thoughts about what a generic failure is and how to go about troubleshooting it?


Tim, the Generic failure error is raised when bad parameters are passed to a WMI method, so two advices, first try using a real port name not Testport1 and check for the DriverName must be the exact name of a existing driver.


Create Printer Powershell by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply