Get-PrintJob

Get-PrintJob

Retrieves a list of print jobs in the specified printer.

Sintaxis

Parameter Set: name
Get-PrintJob [-PrinterName] <String> [-AsJob] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-ID <UInt32> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: object
Get-PrintJob [-PrinterObject] <CimInstance> [-AsJob] [-CimSession <CimSession[]> ] [-ID <UInt32> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Descripción detallada

The Get-PrintJob cmdlet retrieves the current print jobs in the specified printer. Use the PrinterName parameter to list the print jobs from the specified printer.

You cannot use wildcard characters with Get-PrintJob. You can use Get-PrintJob in a Windows PowerShell remoting session.

You do not need administrator privileges to use Get-PrintJob.

Parámetros

-AsJob

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-CimSession<CimSession[]>

Ejecuta el cmdlet en una sesión remota o en un equipo remoto. Escriba un nombre de equipo o un objeto de sesión, como la salida de un cmdlet New-CimSession o Get-CimSession. El valor predeterminado es la sesión actual en el equipo local.

Alias

Session

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-ComputerName<String>

Specifies the name of the computer from which to retrieve the print job information.

Alias

CN,computer

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ID<UInt32>

Specifies the ID of the print job to retrieve. You can use wildcard characters.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-PrinterName<String>

Specifies the name of the printer from which to retrieve the print job information.

Alias

PN

¿Requerido?

true

¿Posición?

1

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByValue, ByPropertyName)

¿Aceptar caracteres comodín?

false

-PrinterObject<CimInstance>

Specifies the printer object from which to retrieve the print job information.

Alias

Printer

¿Requerido?

true

¿Posición?

1

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByValue, ByPropertyName)

¿Aceptar caracteres comodín?

false

-ThrottleLimit<Int32>

Especifica el número máximo de operaciones simultáneas que se pueden establecer para ejecutar el cmdlet. Si se omite este parámetro o es especifica un valor de 0, Windows PowerShell ® calcula un límite óptimo para el cmdlet en función del número de cmdlets de CIM que se estén ejecutando en el equipo. El límite solo se aplica al cmdlet actual, no a la sesión ni al equipo.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

  • Microsoft.Management.Infrastructure.CimInstance#ROOT/StandardCimv2/MSFT_Printer

    This cmdlet accepts one printer object.

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

  • Microsoft.Management.Infrastructure.CimInstance#ROOT/StandardCimv2/MSFT_PrintJob

    This cmdlet returns one or more print job objects.

Ejemplos

Example 1: Get a list of print jobs

This command retrieves a list of print jobs on the printer named PrinterName.

PS C:\> Get-PrintJob –PrinterName "PrinterName"

Example 2: Get a list of print jobs using a printer object

This set of commands retrieves a printer object into a variable ($Printer) using Get-Printer, and then retrieves the list of print jobs on the printer specified by the printer object in the variable by using Get-PrintJob.

PS C:\> $printer = Get-Printer -Name "PrinterName:"
PS C:\> Get-PrintJob –InputObject $printer

Temas relacionados

Remove-PrintJob

Restart-PrintJob

Suspend-PrintJob

Resume-PrintJob