Get Installed Printer Remote Computer

Get Installed Printer Remote Computer

Hello,

Installed printers are present in a WMI class, you can query this remotely with PowerShell. You need to get the “Win32_Printer” class.

Get Installed Printer Remote Computer – PowerShell

You can use PowerShell with DCOM :

Get-WmiObject -Class Win32_Printer
Get Installed Printer Remote Computer - WMI

WMI

And WinRM :

Get-CimInstance -ClassName Win32_Printer
Get Installed Printer Remote Computer - CimInstance

WinRM

Get Installed Printer Remote Computer – CMD

You can also use the old WMIC.exe

wmic path Win32_Printer

Remote computer

All of those three methods will give you some information about installed printers. Each method can query remote computer. With PowerShell, as usual, you need to use the “-ComputerName” (Get-WmiObject) or “-CimSession” (Get-CimInstace) parameters. For WMIC, you need to use the “/Node” switch.

Get-WmiObject -Class Win32_Printer -ComputerName Localhost
Get-CimInstance -ClassName Win32_Printer -CimSession Localhost
wmic /Node:localhost path Win32_Printer

You should use the CimInstance if you have PowerShell 3+ on your execution box, indeed, this is way more firewal friendly, WmiObject and WMIC use the older DCOM.

 

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.