PowerShell Logo Small

Remove-PrintJob



This is the built-in help made by Microsoft for the command 'Remove-PrintJob', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Removes a print job on the specified printer.

SYNTAX


Remove-PrintJob [-InputObject] <CimInstance> [-AsJob] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]
Remove-PrintJob [-PrinterObject] <CimInstance> [-ID] <UInt32> [-AsJob] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]
Remove-PrintJob [-PrinterName] <String> [-ID] <UInt32> [-AsJob] [-CimSession <CimSession[]>] [-ComputerName <String>] [-ThrottleLimit <Int32>] [-Confirm] [-WhatIf]
[<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Remove-PrintJob cmdlet removes a print job on the specified printer.


You can specify the print job to remove by specifying the PrinterName and job ID parameters, by specifying the printer object and job ID parameter, or by specifying a print
job object as an input.


You cannot use wildcard characters with Remove-PrintJob. You can use Remove-PrintJob in a Windows o.microsoft.com/fwlink/?LinkId=289474
Get-PrintJob
Restart-PrintJob
Suspend-PrintJob
Resume-PrintJob

REMARKS

<

Examples


Example 1: Remove a selected print job

PS C:\> Remove-PrintJob -PrinterName "PrinterName" -ID 1



This command removes the print job with an ID of 1 on the printer named PrinterName.




Example 2: Remove a print job using printer object and the print job ID

PS C:\> $printer = Get-Printer -PrinterName "PrinterName"
PS C:\> Remove-PrintJob -PrinterObject $printer -ID "1"



This set of commands retrieves the printer object into a variable ($printer) using Get-Printer, and then passes the contents of the variable to Remove-PrintJob to remove the
print job with an ID of 1 on the printer contained in the printer object.




Example 3: Remove a print job using a print job object

PS C:\> $printJob = Get-PrintJob - PrinterName "PrinterName" -ID 1
PS C:\> Remove-PrintJob -InputObject $printJob



This set of commands retrieves the print job with an ID of 1 into a variable ($printJob) using Get-PrintJob, and then passes the contents of the variable to Remove-PrintJob
to remove the print job on a printer by using a print job object.