Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Add-PrinterDriver -InfPath

$
0
0

Hello,

I am working on managing new windows 8.1 machines with some powershell scripts. I have figured out how to add a printer, assuming that the driver already exists on the machine. However, I cannot seem to add a printer driver.

The line I believe should work looks like this:

Add-PrinterDriver -Name "Canon iR-ADV C5045/5051 PS3" -InfPath "C:\Scratch\CanonPrintDriver\"

However, I receive the following:

Add-PrinterDriver : One or more specified parameters for this operation has an invalid value.
At line:1 char:1
+ Add-PrinterDriver -Name "Canon iR-ADV C5045/5051 PS3" -InfPath "C:\Scratch\Canon ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (MSFT_PrinterDriver:ROOT/StandardCimv2/MSFT_PrinterDriver) [Add-Printer
   Driver], CimException
    + FullyQualifiedErrorId : HRESULT 0x80070057,Add-PrinterDriver

If I remove the -infpath option, it fails, saying the driver does not exist in the driver store, so I know that the issue must be with the syntax of -infpath. However, I am unable to find any resources online that show me an example of the -infpath parameter correctly used. Any ideas?

Thanks


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>