try this
Add-PrinterPort -ComputerName lprint.sa.ucsb.edu -PrinterName SIST-01 -hostname $env:COMPUTERNAME -AsJob
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi there I am having an issue with adding an LPR port to my machine via powershell. I need to create the following port correctly pictured below.
This results in the correct port looking like this.
Running the following script
Add-PrinterPort -Name "lprint.sa.ucsb.edu:SIST-01" -LprHostAddress "lprint.sa.uscb.edu" -LprQueueName "SIST-01"
Gives me a TCP/IP port. How on earth do I get around this?
I tried this:
Add-PrinterPort -ComputerName lprint.sa.ucsb.edu -PrinterName SIST-01 -hostname $env:COMPUTERNAME
but that resulted in some obscure error found below.
Any help would be much appreciated. The LPR service IS turned on.
try this
Add-PrinterPort -ComputerName lprint.sa.ucsb.edu -PrinterName SIST-01 -hostname $env:COMPUTERNAME -AsJob
Hi. Thank you for your question and reaching out. I’d be more than happy to help you with your query.
You can add an LPR (Line Printer Remote) port using the following PowerShell commands:
Add-PrinterPort -Name "LPR Port Name" -PrinterHostAddress "LPR Server IP Address" -PortNumber "LPR Port Number" -Protocol "LPR"
Replace "LPR Port Name" with the desired name for the port, "LPR Server IP Address" with the IP address of the LPR server, and "LPR Port Number" with the desired port number.
Get-PrinterPort | Select-Object Name, Protocol, PortNumber, PrinterHostAddress
This will display a list of all the printer ports and their properties, including the LPR port that was created.
If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.
Double post
The correct PowerShell command to add a Standard TCP/IP Port in LPR Mode is
Add-PrinterPort [-Name] <string> [-LprHostAddress] <string> [-LprQueueName] <string> [-ComputerName <string>]
[-SNMP <uint32>] [-SNMPCommunity <string>] [-LprByteCounting]
The Add-PrinterPort command supports adding Standard TCP/IP Port, Local Ports, and WSD Ports. LPR Port is not supported.