Printer - WMI sample in Powershell
The foundations for Manageability in Windows 2019/2012/2008/ and Windows 10/8/7/Vista/XP are Windows Management Instrumentation (WMI; formerly WBEM) and WMI extensions for Windows Driver Model (WDM).
ActiveXperts Network Monitor provides the ability to build monitor check routines based on WMI. ActiveXperts has collected more than a hundred WMI samples. You can use these samples as a base for new check routines you can write yourself.
On this site, you can find many WMI samples.
The Printer WMI class can be used in ActiveXperts Network Monitor to monitor your servers.
Printer
Example(s)
$strComputer = "." $objWMi = get-wmiobject -computername localhost -Query "Select * from CIM_Printer" foreach ($obj in $objWmi) { write-host "Attributes:" $obj.Attributes write-host "Availability:" $obj.Availability write-host "AvailableJobSheets:" $obj.AvailableJobSheets write-host "AveragePagesPerMinute:" $obj.AveragePagesPerMinute write-host "Capabilities:" $obj.Capabilities write-host "CapabilityDescriptions:" $obj.CapabilityDescriptions write-host "Caption:" $obj.Caption write-host "CharSetsSupported:" $obj.CharSetsSupported write-host "Comment:" $obj.Comment write-host "ConfigManagerErrorCode:" $obj.ConfigManagerErrorCode write-host "ConfigManagerUserConfig:" $obj.ConfigManagerUserConfig write-host "CreationClassName:" $obj.CreationClassName write-host "CurrentCapabilities:" $obj.CurrentCapabilities write-host "CurrentCharSet:" $obj.CurrentCharSet write-host "CurrentLanguage:" $obj.CurrentLanguage write-host "CurrentMimeType:" $obj.CurrentMimeType write-host "CurrentNaturalLanguage:" $obj.CurrentNaturalLanguage write-host "CurrentPaperType:" $obj.CurrentPaperType write-host "Default:" $obj.Default write-host "DefaultCapabilities:" $obj.DefaultCapabilities write-host "DefaultCopies:" $obj.DefaultCopies write-host "DefaultLanguage:" $obj.DefaultLanguage write-host "DefaultMimeType:" $obj.DefaultMimeType write-host "DefaultNumberUp:" $obj.DefaultNumberUp write-host "DefaultPaperType:" $obj.DefaultPaperType write-host "DefaultPriority:" $obj.DefaultPriority write-host "Description:" $obj.Description write-host "DetectedErrorState:" $obj.DetectedErrorState write-host "DeviceID:" $obj.DeviceID write-host "Direct:" $obj.Direct write-host "DoCompleteFirst:" $obj.DoCompleteFirst write-host "DriverName:" $obj.DriverName write-host "EnableBIDI:" $obj.EnableBIDI write-host "EnableDevQueryPrint:" $obj.EnableDevQueryPrint write-host "ErrorCleared:" $obj.ErrorCleared write-host "ErrorDescription:" $obj.ErrorDescription write-host "ErrorInformation:" $obj.ErrorInformation write-host "ExtendedDetectedErrorState:" $obj.ExtendedDetectedErrorState write-host "ExtendedPrinterStatus:" $obj.ExtendedPrinterStatus write-host "Hidden:" $obj.Hidden write-host "HorizontalResolution:" $obj.HorizontalResolution write-host "InstallDate:" $obj.InstallDate write-host "JobCountSinceLastReset:" $obj.JobCountSinceLastReset write-host "KeepPrintedJobs:" $obj.KeepPrintedJobs write-host "LanguagesSupported:" $obj.LanguagesSupported write-host "LastErrorCode:" $obj.LastErrorCode write-host "Local:" $obj.Local write-host "Location:" $obj.Location write-host "MarkingTechnology:" $obj.MarkingTechnology write-host "MaxCopies:" $obj.MaxCopies write-host "MaxNumberUp:" $obj.MaxNumberUp write-host "MaxSizeSupported:" $obj.MaxSizeSupported write-host "MimeTypesSupported:" $obj.MimeTypesSupported write-host "Name:" $obj.Name write-host "NaturalLanguagesSupported:" $obj.NaturalLanguagesSupported write-host "Network:" $obj.Network write-host "PaperSizesSupported:" $obj.PaperSizesSupported write-host "PaperTypesAvailable:" $obj.PaperTypesAvailable write-host "Parameters:" $obj.Parameters write-host "PNPDeviceID:" $obj.PNPDeviceID write-host "PortName:" $obj.PortName write-host "PowerManagementCapabilities:" $obj.PowerManagementCapabilities write-host "PowerManagementSupported:" $obj.PowerManagementSupported write-host "PrinterPaperNames:" $obj.PrinterPaperNames write-host "PrinterState:" $obj.PrinterState write-host "PrinterStatus:" $obj.PrinterStatus write-host "PrintJobDataType:" $obj.PrintJobDataType write-host "PrintProcessor:" $obj.PrintProcessor write-host "Priority:" $obj.Priority write-host "Published:" $obj.Published write-host "Queued:" $obj.Queued write-host "RawOnly:" $obj.RawOnly write-host "SeparatorFile:" $obj.SeparatorFile write-host "ServerName:" $obj.ServerName write-host "Shared:" $obj.Shared write-host "ShareName:" $obj.ShareName write-host "SpoolEnabled:" $obj.SpoolEnabled write-host "StartTime:" $obj.StartTime write-host "Status:" $obj.Status write-host "StatusInfo:" $obj.StatusInfo write-host "SystemCreationClassName:" $obj.SystemCreationClassName write-host "SystemName:" $obj.SystemName write-host "TimeOfLastReset:" $obj.TimeOfLastReset write-host "UntilTime:" $obj.UntilTime write-host "VerticalResolution:" $obj.VerticalResolution write-host "WorkOffline:" $obj.WorkOffline write-host write-host "########" write-host }