Win32_PrintJob

CIM_Job is a logical element representing a unit of work for a system, such as a print job. A job is distinct from a process in that a job can be scheduled.

Quick Start

Properties

In this WMI class, all WMI properties are read-only. You can only read values but not change them.

Caption

Data type String

The Caption property is a short textual description (one-line string) of the object.

Color

Data type String

The Color property indicates whether the document is to be printed in color or monochrome. Some color printers have the capability to print using $true black instead of a combination of Yellow, Cyan, and Magenta. This usually creates darker and sharper text for documents. This option is only useful for color printers that support $true black printing.

DataType

Data type String

The DataType property indicates the format of the data for this print job. This instructs the printer driver to eithertranslate the data (generic text, PostScript, or PCL) before printing, or to print in a raw format (for graphics and pictures).

Example: TEXT

Description

Data type String

The Description property provides a textual description of the object.

Document

Data type String

The Document property specifies the name of the print job. The user sees this name when viewing documents waiting to be printed.

Example: Microsoft Word – Review.doc

DriverName

Data type String

The DriverName property indicates the name of the printer driver used for the print job.

ElapsedTime

Data type DateTime

Length of time that the job has been executing.

HostPrintQueue

Data type String

The HostPrintQueue property contains the name of the computer on which the print job was created.

InstallDate

Data type DateTime

The InstallDate property is datetime value indicating when the object was installed. A lack of a value does not indicate that the object is not installed.

JobId

Data type UInt32

The JobId property indicates the identifier number of the job. It is used by other methods as a handle to a single job spooling to the printer.

JobStatus

Data type String

A free form string representing the job’s status.

Name

Data type String

The Name property defines the label by which the object is known. When subclassed, the Name property can be overridden to be a Key property.

Notify

Data type String

User to be notified upon job completion or failure. This property is restricted to 16 characters under Windows 9x platforms.

Owner

Data type String

User that submitted the job.

PagesPrinted

Data type UInt32

The PagesPrinted property specifies the number of pages that have been printed. This value may be zero if the print job does not contain page delimiting information.

PaperLength

Data type UInt32

The PaperLength property indicates the length of the paper.

Example: 2794

PaperSize

Data type String

The PaperSize property indicates the size of the paper.

Example: A4 or Letter

PaperWidth

Data type UInt32

The PaperWidth property indicates the width of the paper.

Example: 2159

Parameters

Data type String

The Parameters property indicates optional parameters to send to the print processor. See the PrintProcessor member for more information.

PrintProcessor

Data type String

The PrintProcessor property indicates the print processor service used to process the print job. A printer processor works in conjunction with the printer driver to provide additional translation of printer data for the printer, and can also be used to provide special options such as a title page for the job.

Priority

Data type UInt32

Priority indicates the urgency or importance of execution of a job.

Size

Data type UInt32

The Size property indicates the size of the print job.

SizeHigh

Data type UInt32

The SizeHigh property indicates the size of the print job if the Size property exceeds 4,294,967,295 bytes.

StartTime

Data type DateTime

Time that the job was begun.

Status

Data type String

The Status property is a string indicating the current status of the object. Various operational and non-operational statuses can be defined. Operational statuses are “OK”, “Degraded” and “Pred Fail”. “Pred Fail” indicates that an element may be functioning properly but predicting a failure in the near future. An example is a SMART-enabled hard drive. Non-operational statuses can also be specified. These are “Error”, “Starting”, “Stopping” and “Service”. The latter, “Service”, could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is on-line, yet the managed element is neither “OK” nor in one of the other states.

'OK','Error','Degraded','Unknown','Pred Fail','Starting','Stopping','Service','Stressed','NonRecover','No Contact','Lost Comm'

StatusMask

Data type UInt32

The StatusMask property specifies a bitmap of the possible statuses relating to this print job.

$Paused=1
$Error=2
$Deleting=4
$Spooling=8
$Printing=16
$Offline=32
$Paperout=64
$Printed=128
$Deleted=256
$Blocked_DevQ=512
$User_Intervention_Req=1024
$Restart=2048

$StatusMask = $Printing + $Printed

TimeSubmitted

Data type DateTime

Time that the job was submitted.

TotalPages

Data type UInt32

The TotalPages property specifies the number of pages required to complete the job. This value may be zero if the print job does not contain page-delimiting information.

UntilTime

Data type DateTime

Time after which the job is invalid or should be stopped.

Methods

Examples

Help and Questions

  Community Content

You are cordially invited to add knowledge to this page. If you have sample code or additional information related to this WMI class, please share it. Use the comment form to send your information. We will edit and incorparate it into the reference library. Thank you!

Please do not use the comment form to submit questions. If you have questions or need assistance, visit our free forum: Help me with WMI.

Content last updated: 2013-12-27 12:20:11 (UTC).

Facebooktwittergoogle_pluspinterestlinkedinFacebooktwittergoogle_pluspinterestlinkedin