NAME
Add-PrinterPort
SYNOPSIS
Installs a printer port on the specified computer.SYNTAX
Add-PrinterPort [-Name]
[-CimSession ] [-ComputerName ] [-ThrottleLimit ] [-Confirm] [-WhatIf] [
] Add-PrinterPort [-Name]
[-PrinterHostAddress] [-CimSession ] [-ComputerName
] [-PortNumber ] [-SNMP ] [-SNMPCommunity ] [-ThrottleLimit ] [-Confirm] [-WhatIf] [
] Add-PrinterPort [-HostName]
[-PrinterName] [-CimSession ] [-ComputerName ] [-ThrottleLimit
] [-Confirm] [-WhatIf] [ ] Add-PrinterPort [-Name]
[-LprHostAddress] [-LprQueueName] [-CimSession ] [-ComputerName
] [-LprByteCounting] [-SNMP ] [-SNMPCommunity ] [-ThrottleLimit ] [-Confirm] [-WhatIf] [
] DESCRIPTION
The Add-PrinterPort cmdlet creates a printer port on the specified computer. You can create a local printer port,
a printer port using TCP, and LPR printer ports by using Add-PrinterPort.
You cannot use wildcard characters with Add-PrinterPort. You can use Add-PrinterPort in a Windows PowerShell
remoting session.You do not need administrator credentials to run Add-PrinterPort.
PARAMETERS
-CimSession [
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such] as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local
computer. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false-ComputerName [
Specifies the name of the computer to which to add the printer port. If you do not specify a value, the printer port is added to the local computer. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false] -HostName
Specifies the host name of the computer on which to add LPR printer port. Required? true Position? 1 Default value none Accept pipeline input? false Accept wildcard characters? false-LprByteCounting [
Indicates that this cmdlet enables LPR byte counting for a TCP/IP printer port in LPR mode. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false] -LprHostAddress
Specifies the LPR host address when installing a TCP/IP printer port in LPR mode. Required? true Position? 2 Default value none Accept pipeline input? false Accept wildcard characters? false-LprQueueName
Specifies the LPR queue name when installing a TCP/IP printer port in LPR mode. Required? true Position? 3 Default value none Accept pipeline input? false Accept wildcard characters? false-Name
Specifies the name of the printer port to install on the specified computer. Required? true Position? 1 Default value none Accept pipeline input? false Accept wildcard characters? false-PortNumber [
Specifies the TCP/IP port number for the printer port added to the specified computer. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false] -PrinterHostAddress
Specifies the host address of the TCP/IP printer port added to the specified computer. Required? true Position? 2 Default value none Accept pipeline input? false Accept wildcard characters? false-PrinterName
Specifies the name of the printer installed on the LPR printer port. Required? true Position? 2 Default value none Accept pipeline input? false Accept wildcard characters? false-SNMP [
Enables SNMP and specifies the index for TCP/IP printer port management. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false] -SNMPCommunity [
Specifies the SNMP community name for TCP/IP printer port management. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false] -ThrottleLimit [
Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShellr calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false] -Confirm [
Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet. Required? false Position? named Default value false Accept pipeline input? false Accept wildcard characters? false] -WhatIf [
Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run. Required? false Position? named Default value false Accept pipeline input? false Accept wildcard characters? false] This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216). INPUTS
None This cmdlet accepts no input objects.OUTPUTS
Microsoft.Management.Infrastructure.CimInstance#ROOT/StandardCimv2/MSFT_PrinterPort This cmdlet returns an object that contains the new printer port.Example 1: Create a local printer port
PS C:\> Add-PrinterPort -Name "LocalPort:"
This command creates a local printer port named LocalPort on the local computer.Example 2: Create a TCP printer port
PS C:\> Add-PrinterPort -Name "TCPPort:" -PrinterHostAddress "192.168.100.100"
This command creates a TCP printer port named TCPPort: with an IP address of 192.168.100.100 on the computer.RELATED LINKS
Get-PrinterPort
Remove-PrinterPort