24/7/365 Support

Retrieve Printer Information

Problem

You want to get information about printers on the current system.

Solution

To retrieve information about printers attached to the system, use the Win32_Printer WMI class:

PS >GetWmiObject Win32_Printer | SelectObject Name,PrinterStatus

Name
PrinterStatus

Microsoft Office Document Image Wr...
3

Microsoft Office Document Image Wr...
3

CutePDF Writer
3

Brother DCP1000
3

To retrieve information about a specific printer, apply a filter based on its name:

PS >$device = GetWmiObject Win32_Printer Filter "Name='Brother DCP1000'" PS >$device | FormatList *

Status : Unknown Name : Brother DCP1000 Attributes : 588 Availability : AvailableJobSheets : AveragePagesPerMinute : 0 Capabilities : {4, 2, 5} CapabilityDescriptions : {Copies, Color, Collate} Caption : Brother DCP1000 (...)

To retrieve specific properties, access as you would access properties on other PowerShell objects:

PS >$device.VerticalResolution 600 PS >$device.HorizontalResolution 600

Discussion

The example in the solution uses the Win32_Printer WMI class to retrieve information about installed printers on the computer. While the Win32_Printer class gives access to most commonly used information, WMI supports several other printerrelated classes: Win32_TCPIPPrinterPort, Win32_PrinterDriver, CIM_Printer, Win32_PrinterConfiguration, Win32_PrinterSetting, Win32_PrinterController, Win32_PrinterShare, and Win32_PrinterDriverDll.

Help Category:

Get Windows Dedicated Server

Only reading will not help you, you have to practice it! So get it now.

Processor RAM Storage Server Detail
Intel Atom C2350 1.7 GHz 2c/2t 4 GB DDR3 1× 1 TB (HDD SATA) Configure Server
Intel Atom C2350 1.7 GHz 2c/2t 4 GB DDR3 1× 128 GB (SSD SATA) Configure Server
Intel Atom C2750 2.4 GHz 8c/8t 8 GB DDR3 1× 1 TB (HDD SATA) Configure Server
Intel Xeon E3-1230 v2 3.3 GHz 4c/8t 16 GB DDR3 1× 256 GB (SSD SATA) Configure Server
Intel Atom C2350 1.7 GHz 2c/2t 4 GB DDR3 1× 250 GB (SSD SATA) Configure Server

What Our Clients Say