Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Stop-OfficePrintJob

Module
PSWriteOffice
Inputs
System.String
Outputs
OfficeIMO.Workflows.PdfPrintJobStatus

Cancels a print job submitted with Send-OfficePrinter and returns its state afterwards. Requires PowerShell 7.4 or newer.

Syntax

Stop-OfficePrintJob
[-JobId] <String>
[-PrinterName] <String>
[<CommonParameters>]
#
Parameter set: Default

Description

A job that has already finished is reported unchanged. Pages the printer has already received may still print.

Examples

Cancel a submitted job.

Send-OfficePrinter -Path .\Report.pdf -PrinterName 'Office printer' | Stop-OfficePrintJob

Parameters

-JobId String requiredposition: 1pipeline: True (ByPropertyName)
The job identifier from the receipt.
-PrinterName String requiredposition: 0pipeline: True (ByPropertyName)
The printer queue name or IPP URI from the receipt.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.