Get-PrinterProperty

Get-PrinterProperty

Retrieves printer properties for the specified printer.

Sintaxis

Parameter Set: Query (cdxml)
Get-PrinterProperty [-PrinterName] <String> [[-PropertyName] <String[]> ] [-AsJob] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Descripción detallada

The Get-PrinterProperty cmdlet retrieves one or more printer properties for the specified printer.

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

You need administrator privileges to use Get-PrinterProperty.

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 printer properties.

Alias

CN

¿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 printer properties.

Alias

ninguno

¿Requerido?

true

¿Posición?

1

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-PropertyName<String[]>

Specifies the property name to retrieve.

Alias

ninguno

¿Requerido?

false

¿Posición?

2

Valor predeterminado

ninguno

¿Aceptar canalización?

True (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.

  • None

    This cmdlet accepts no input objects.

Salidas

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

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

    This cmdlet returns a printer property object.

Ejemplos

Example 1: Get printer properties

This command returns a list of properties for the printer specified by PrinterName.

PS C:\> Get-PrinterProperty -PrinterName "Printer name"

Example 2: Get printer properties for all installed printers

This command gets all the printers into a variable $printers and then loops through all the printers and displays the properties.

PS C:\> $printers = get-printer * foreach ($printer in $printers){     get-printerproperty –printerName $printer.name }

Temas relacionados

Set-PrinterProperty