I am trying to install multiple printers on a print server, however before that as a pre-requisite I have to add the printer drivers for which I am performing below steps but I am unable to view the correct driver under Get-PrinterDriver commandlet. Please help me.
Step 1 add and Install the driver from source inf file
pnputil /add-driver D:\Drivers\Ricoh\Ricoh MP 402\disk1\oemsetup.inf /install
Step 2 get the list of printer drivers
Get-PrinterDriver -Name *
Step 3 add ports of the printer
Add-PrinterPort -Name <Priner IP address> -PrinterHostAddress <Priner IP address>
Step 4 add Printer
Add-Printer -Name <Printer Name> -DriverName 'Ricoh MP 402SPF' -PortName <Printer IP Address>
However, in step 4 the command fails with below error.
Add-Printer : The specified driver does not exist. Use add-printerdriver to add a new driver, or specify an existing driver. At D:\Install_printer.ps1:41 char:17
When I investigated, then I found that under Get-PrinterDriver command I am unable to see the correct driver name 'Ricoh MP 402SPF' and when I checked C:\Windows\INF\setupapi.dev.log file, I was able to see the driver was installed successfully.
Out put of Get-PrinterDriver commandlet
PCL6 V4 Driver for Universal Print
Microsoft XPS Document Writer v4
Microsoft Print To PDF
Microsoft enhanced Point and Print driver
HP LaserJet 9040 PCL6 Class Driver
RICOH SP 4510DN PCL 6
Ricoh MP C1500/615C PCL6
Remote Desktop Easy Print
Microsoft enhanced Point and Print compatibility driver
Generic / Text Only
Microsoft enhanced Point and Print compatibility driver
Can someone help me what exactly I am missing and where/how I can install the driver? Also can someone guid if add-printerdriver is still required? If Yes, please guide me how can I check what's the name of the driver?
PS: I have created a whole script using the above command lets, so even using solo commandlets also I am failing to install the printers.