Printer - WMI sample in VBScript
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)
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * From CIM_Printer") For Each objItem in colItems WScript.Echo "Attributes:" & objItem.Attributes WScript.Echo "Availability:" & objItem.Availability WScript.Echo "AvailableJobSheets:" & objItem.AvailableJobSheets WScript.Echo "AveragePagesPerMinute:" & objItem.AveragePagesPerMinute WScript.Echo "Capabilities:" & objItem.Capabilities WScript.Echo "CapabilityDescriptions:" & objItem.CapabilityDescriptions WScript.Echo "Caption:" & objItem.Caption WScript.Echo "CharSetsSupported:" & objItem.CharSetsSupported WScript.Echo "Comment:" & objItem.Comment WScript.Echo "ConfigManagerErrorCode:" & objItem.ConfigManagerErrorCode WScript.Echo "ConfigManagerUserConfig:" & objItem.ConfigManagerUserConfig WScript.Echo "CreationClassName:" & objItem.CreationClassName WScript.Echo "CurrentCapabilities:" & objItem.CurrentCapabilities WScript.Echo "CurrentCharSet:" & objItem.CurrentCharSet WScript.Echo "CurrentLanguage:" & objItem.CurrentLanguage WScript.Echo "CurrentMimeType:" & objItem.CurrentMimeType WScript.Echo "CurrentNaturalLanguage:" & objItem.CurrentNaturalLanguage WScript.Echo "CurrentPaperType:" & objItem.CurrentPaperType WScript.Echo "Default:" & objItem.Default WScript.Echo "DefaultCapabilities:" & objItem.DefaultCapabilities WScript.Echo "DefaultCopies:" & objItem.DefaultCopies WScript.Echo "DefaultLanguage:" & objItem.DefaultLanguage WScript.Echo "DefaultMimeType:" & objItem.DefaultMimeType WScript.Echo "DefaultNumberUp:" & objItem.DefaultNumberUp WScript.Echo "DefaultPaperType:" & objItem.DefaultPaperType WScript.Echo "DefaultPriority:" & objItem.DefaultPriority WScript.Echo "Description:" & objItem.Description WScript.Echo "DetectedErrorState:" & objItem.DetectedErrorState WScript.Echo "DeviceID:" & objItem.DeviceID WScript.Echo "Direct:" & objItem.Direct WScript.Echo "DoCompleteFirst:" & objItem.DoCompleteFirst WScript.Echo "DriverName:" & objItem.DriverName WScript.Echo "EnableBIDI:" & objItem.EnableBIDI WScript.Echo "EnableDevQueryPrint:" & objItem.EnableDevQueryPrint WScript.Echo "ErrorCleared:" & objItem.ErrorCleared WScript.Echo "ErrorDescription:" & objItem.ErrorDescription WScript.Echo "ErrorInformation:" & objItem.ErrorInformation WScript.Echo "ExtendedDetectedErrorState:" & objItem.ExtendedDetectedErrorState WScript.Echo "ExtendedPrinterStatus:" & objItem.ExtendedPrinterStatus WScript.Echo "Hidden:" & objItem.Hidden WScript.Echo "HorizontalResolution:" & objItem.HorizontalResolution WScript.Echo "InstallDate:" & objItem.InstallDate WScript.Echo "JobCountSinceLastReset:" & objItem.JobCountSinceLastReset WScript.Echo "KeepPrintedJobs:" & objItem.KeepPrintedJobs WScript.Echo "LanguagesSupported:" & objItem.LanguagesSupported WScript.Echo "LastErrorCode:" & objItem.LastErrorCode WScript.Echo "Local:" & objItem.Local WScript.Echo "Location:" & objItem.Location WScript.Echo "MarkingTechnology:" & objItem.MarkingTechnology WScript.Echo "MaxCopies:" & objItem.MaxCopies WScript.Echo "MaxNumberUp:" & objItem.MaxNumberUp WScript.Echo "MaxSizeSupported:" & objItem.MaxSizeSupported WScript.Echo "MimeTypesSupported:" & objItem.MimeTypesSupported WScript.Echo "Name:" & objItem.Name WScript.Echo "NaturalLanguagesSupported:" & objItem.NaturalLanguagesSupported WScript.Echo "Network:" & objItem.Network WScript.Echo "PaperSizesSupported:" & objItem.PaperSizesSupported WScript.Echo "PaperTypesAvailable:" & objItem.PaperTypesAvailable WScript.Echo "Parameters:" & objItem.Parameters WScript.Echo "PNPDeviceID:" & objItem.PNPDeviceID WScript.Echo "PortName:" & objItem.PortName WScript.Echo "PowerManagementCapabilities:" & objItem.PowerManagementCapabilities WScript.Echo "PowerManagementSupported:" & objItem.PowerManagementSupported WScript.Echo "PrinterPaperNames:" & objItem.PrinterPaperNames WScript.Echo "PrinterState:" & objItem.PrinterState WScript.Echo "PrinterStatus:" & objItem.PrinterStatus WScript.Echo "PrintJobDataType:" & objItem.PrintJobDataType WScript.Echo "PrintProcessor:" & objItem.PrintProcessor WScript.Echo "Priority:" & objItem.Priority WScript.Echo "Published:" & objItem.Published WScript.Echo "Queued:" & objItem.Queued WScript.Echo "RawOnly:" & objItem.RawOnly WScript.Echo "SeparatorFile:" & objItem.SeparatorFile WScript.Echo "ServerName:" & objItem.ServerName WScript.Echo "Shared:" & objItem.Shared WScript.Echo "ShareName:" & objItem.ShareName WScript.Echo "SpoolEnabled:" & objItem.SpoolEnabled WScript.Echo "StartTime:" & objItem.StartTime WScript.Echo "Status:" & objItem.Status WScript.Echo "StatusInfo:" & objItem.StatusInfo WScript.Echo "SystemCreationClassName:" & objItem.SystemCreationClassName WScript.Echo "SystemName:" & objItem.SystemName WScript.Echo "TimeOfLastReset:" & objItem.TimeOfLastReset WScript.Echo "UntilTime:" & objItem.UntilTime WScript.Echo "VerticalResolution:" & objItem.VerticalResolution WScript.Echo "WorkOffline:" & objItem.WorkOffline WScript.Echo "" WScript.Echo "########" WScript.Echo "" Next