Partager via


Write-PrinterNfcTag

Write-PrinterNfcTag

Writes printer connection data to an NFC tag.

Syntaxe

Parameter Set: ManualSpecification
Write-PrinterNfcTag [[-SharePath] <String[]> ] [[-WsdAddress] <String[]> ] [[-Lock]] [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: PrinterNfcTag
Write-PrinterNfcTag [-InputObject] <CimInstance> [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Description détaillée

The Write-PrinterNfcTag cmdlet writes a near field communication (NFC) tag with printer connection data. You can use NFC tags to program shared printers and Web Services for Devices (WSD) printers. If multiple print shares or WSD device addresses support the same device, the cmdlet writes the NFC tag in the order of the print shares or WSD device addresses that you specify. This cmdlet requires that the system have an NFC radio available.

Specify the printer connection data for this cmdlet by specifying the paths of shared printers or the IP addresses WSD printers, or by using the InputObject parameter to specify a printer object as input to this cmdlet.

Paramètres

-AsJob

Alias

none

Obligatoire ?

false

Position ?

named

Valeur par défaut

none

Accepter l’entrée de pipeline ?

false

Accepter les caractères génériques ?

false

-CimSession<CimSession[]>

Exécute l’applet de commande dans une session à distance ou sur un ordinateur distant. Entrez un nom d’ordinateur ou un objet de session, comme la sortie d’une applet de commande New-CimSession ou Get-CimSession. La valeur par défaut est la session active sur l’ordinateur local.

Alias

Session

Obligatoire ?

false

Position ?

named

Valeur par défaut

none

Accepter l’entrée de pipeline ?

false

Accepter les caractères génériques ?

false

-InputObject<CimInstance>

Specifies the NfcTag object to use as input to this cmdlet. To obtain an NfcTag object, use the Read-PrinterNfcTag cmdlet.

Alias

none

Obligatoire ?

true

Position ?

1

Valeur par défaut

none

Accepter l’entrée de pipeline ?

True (ByValue)

Accepter les caractères génériques ?

false

-Lock

Indicates that the NFC tags cannot be modified after you write the NFC tags. You cannot unlock a locked NFC tag.

Alias

none

Obligatoire ?

false

Position ?

3

Valeur par défaut

none

Accepter l’entrée de pipeline ?

True (ByValue)

Accepter les caractères génériques ?

false

-SharePath<String[]>

Specifies an array of paths of shared printers. Use the following format: \\printServer\shareName. The cmdlet writes the path of the shared printers to an NFC tag.

Alias

none

Obligatoire ?

false

Position ?

1

Valeur par défaut

none

Accepter l’entrée de pipeline ?

True (ByValue)

Accepter les caractères génériques ?

false

-ThrottleLimit<Int32>

Spécifie le nombre maximal d’opérations simultanées qui peuvent être établies pour exécuter cette applet de commande. Si ce paramètre est omis ou si la valeur 0 est entrée, Windows PowerShell ® calcule une limitation optimale pour l’applet de commande en fonction du nombre d’applets de commande CIM qui s’exécutent sur l’ordinateur. La limitation s’applique seulement à l’applet de commande actuelle, et non pas à la session ni à l’ordinateur.

Alias

none

Obligatoire ?

false

Position ?

named

Valeur par défaut

none

Accepter l’entrée de pipeline ?

false

Accepter les caractères génériques ?

false

-WsdAddress<String[]>

Specifies an array of IP addresses of WSD printers. The cmdlet writes the IP addresses of the of WSD printers to a printer NFC tag. Les valeurs acceptables pour ce paramètre sont :an IPv4 or IPv6 IP address or any value that resolves to an IP address, such as a fully qualified domain name (FQDN) or Hostname.

Alias

none

Obligatoire ?

false

Position ?

2

Valeur par défaut

none

Accepter l’entrée de pipeline ?

True (ByValue)

Accepter les caractères génériques ?

false

<CommonParameters>

Cette applet de commande prend en charge les paramètres courants : -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer et -OutVariable. Pour plus d’informations, consultez about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entrées

Le type d’entrée correspond au type des objets que vous pouvez transmettre à l’applet de commande.

Sorties

Le type de sortie est le type des objets émis par l’applet de commande.

Exemples

Example 1: Write printer connection data to an NFC tag

This command writes printer connection data to an NFC tag for the specified shared printers and the WSD printer that has the host name PrinterHost01.

PS C:\> Write- PrinterNfcTag -SharePath "\\ServerName\PrinterName01","\\AlternateServerName\PrinterName02" -WsdAddress "PrinterHost01"

Example 2: Copy an NFC tag

This command uses the Read-PrinterNfcTag to read the printer connection data from the next NFC tag that someone taps against the NFC reader. The command passes the printer connection data to the next cmdlet by using the pipeline operator. The command then writes the printer connection data to an NFC tag when a user taps the tag against the NFC radio.

PS C:\> Read-PrinterNfcTag | Write-PrinterNfcTag

Rubriques connexes

Read-PrinterNfcTag