Read-PrinterNfcTag
Read-PrinterNfcTag
Reads information about printers from an NFC tag.
Syntaxe
Parameter Set: Read0
Read-PrinterNfcTag [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Description détaillée
The Read-PrinterNfcTag cmdlet reads information about printers from the near field communication (NFC) tag that anyone taps against the default NFC reader for the system. The cmdlet returns the printer information that it reads as a table that contains the value of the SharePath property and the value and the wsdAddress property for the printers.
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 |
-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 |
<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: Read an NFC tag
This first command reads printer connection data from the next NFC tag that someone taps against the NFC reader. The command stores the printer information in the $Tag variable.
The second command uses the Write-PrinterNfcTag to write the printer connection information stored in $Tag to an NFC tag.
PS C:\> $Tag = Read-PrinterNfcTag
PS C:\> Write-PrinterNfcTag $Tag
Example 2: Modify the share path of a printer connection
This first command reads printer connection information from the next NFC tag that someone taps against the NFC reader. The command stores the printer information in the $Tag variable.
The second command changes the share path of the shared printers stored in $Tag. The command uses standard dot syntax to access the SharePaths property of the object stored in $Tag.
PS C:\> $Tag = Read-PrinterNfcTag
PS C:\> $Tag.SharePaths = "\\ntprint\b27-3697-b"