Get-PrinterInformation

Gathering Printerinformation can be done through WMI. Win32_Printer contains information about printers that are used by a computer and Win32_PrinterDriver contains information about the printer drivers. We can combine these 2 WMI classes and retrieve information about both the printer and it’s drivers. This script checks for the following properties:

Computer             : Client1
Name                 : \\SERVER\SRV-FLOOR1-SV01
DefaultPrinter       : True
DriverName           : HP LaserJet 4250 PCL 6
DriverPath           : C:\Windows\system32\spo...
Driverdll            : UNIDRV.DLL
HorizontalResolution : 600
VerticalResolution   : 600
LocalPrinter         : False
PrintProcessor       : HPZPP4wm
Location             : GOT
Comment              : Company Printer
Description          : Printer on Floor 1

I’ve included a switch that let’s you pipe the information to a csv instead of displaying it to the host, and if you pipe an array of computer names to the script you can retrieve information from multiple computers.

Running the Script:


PS > .\Get-PrinterInformation.ps1 -Computer Client1 -ToCsv

PS > "Client1","Client2","Client3" | 
>> ForEach { .\Get-PrinterInformation.ps1 -Computer $_ }

Here’s a link to the script.
Get-PrinterInformation.ps1

Rating 4.00 out of 5
[?]

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Anti-Spam Protection by WP-SpamFree