Powershell Script To Install Printer Driver

Powershell Script To Install Printer Driver 4,8/5 260 votes

Installing a new network printer using Windows PowerShell involves performing the following steps: Installing a printer driver for the new printer. Add-printer remotely. And it's discussed at some length in 'Secrets of PowerShell Remoting'. You need to install the print(er) driver. Mera ghar ek sapna sahara one.

Install

2 Shares This is a follow up post to last week. There’s indeed many smart people out there so today I wanted to share a similar script created by a friend of mine Microsoft PowerShell MVP Jan Egil Ring. This blog post is just a summary of his awesome work so please visit the original blog post and give Jan Egil some creds in the comments on his blog. As I described in the last post the easiest way to install printer drivers is to manually or automatically connect to your print server(s) to install the drivers. This is normally not a problem in small environments with only 1 print server and.

Windows PowerShell (POSH) is a command-line shell and associated scripting language created by Microsoft. Offering full access to COM, WMI and.NET, POSH is a full-featured task automation framework for distributed Microsoft platforms and solutions. SUBREDDIT FILTERS • RESOURCES • • • • • • • • • • • • • • • • SCRIPT REPOSITORIES • • • • • • • VIRTUAL LABS & BOOKS • • • • BLOGS & PODCASTS • • • • • • • • • LIVE CHAT • • • • • • NORTH AMERICAN USER GROUPS • remote-capable • • remote-capable • • remote-capable • • EUROPEAN USER GROUPS • • •. Okay., so I've been tinkering with this one for a little bit longer than it should've taken.This should all work entirely fine but I am still encountering issues ONLY when I execute this script remotely. Here's the layout I have. Please note this is not the full script just a cutout of the basic commands I'm using for the PRINTER PIECE ONLY. Mystery ranch backpacks.

Write-host 'Mapping Network Printer' -ForegroundColor Red Add-PrinterPort -ComputerName $strComputer -name 'PRINTER 1' -PrinterHostAddress 'XXX.X.XX.XXX' write-host 'Adding Printer Driver to systems driver spool' -ForegroundColor Red Add-PrinterDriver -CimSession $strComputer -Name 'HP Universal Printing PCL 6' start-sleep -seconds 60 Add-Printer -ComputerName $strComputer -Name 'Printer 1' -DriverName 'HP Universal Printing PCL 6' -port 'PRINTER 1' start-sleep -seconds 60 Now what I am seeing within powershell is the following error. Add-PrinterDriver: The specified driver does not exist in the driver store.

At line:1 char:1 + Add-PrinterDriver -CimSession COMPUTER -Name 'HP Universal Printi. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo: NotSpecified: (MSFT_PrinterDriver:ROOT/StandardCimv2/MSFT_PrinterDriver) [Add-PrinterDri ver], CimException + FullyQualifiedErrorId: HRESULT 0x80070705,Add-PrinterDriver + PSComputerName: COMPUTER Now what this tells me is I'm having problems with getting the driver to stage itself within the Driver Store on the system.