Home
> PowerShell > PowerShell TidBits – How to list all printers installed on a computer?
PowerShell TidBits – How to list all printers installed on a computer?
Use following PowerShell commands to list all printers installed on any machine…
First command uses WMI (Windows Management Instrumentation)…
Get-WmiObject -Class "Win32_Printer" -ComputerName "localhost" | ft -Property Name, DriverName, SystemName, ShareName -AutoSize
Command Output
Name DriverName SystemName ShareName ---- ---------- ---------- --------- Send To OneNote 2016 Send to Microsoft OneNote 16 Driver MYMACHINE Microsoft XPS Document Writer Microsoft XPS Document Writer v4 MYMACHINE Microsoft Print to PDF Microsoft Print To PDF MYMACHINE Fax Microsoft Shared Fax Driver MYMACHINE
The next command uses built-in PowerShell command Get-Printer…
Get-Printer -ComputerName mymachine
Command Output
Name ComputerName Type DriverName PortName Shared Published DeviceType ---- ------------ ---- ---------- -------- ------ --------- ---------- Send To OneNote 2016 mymachine Local Send to Microsoft OneN... xxx: False False Print Microsoft XPS Document Writer mymachine Local Microsoft XPS Document... xxxxxxxxxx: False False Print Microsoft Print to PDF mymachine Local Microsoft Print To PDF xxxxxxxxxx: False False Print Fax mymachine Local Microsoft Shared Fax D... xxxxxx: False False Print
Please note that I’ve removed some printers from this list due to security issues.
Categories: PowerShell
PowerShell, PowerShell Tips, Printer, WMI
Comments (0)
Trackbacks (0)
Leave a comment
Trackback