Question regarding LPR print port creation using POWERSHELL

Ramesh, Swaroop 21 Reputation points

Hello Microsoft team,

I had a query regarding LPR port creation using powerhsell,
I have went through the commands for creating LPR port using powershell for example as below

add-printerport -Name "" -lprhostaddress "" -lprbytecounting -lprqueuename "PTSTPRNTR"

When i execute this command the port is getting created under TCP/IP Printer port monitor only with LPR option.
But i need a LPR printer port that needs to be created under LPR printer port only.

  1. I need a LPR port that needs to be created as in Screenshot 1 which is actually a correct one and the port needs to be created with format where is a host address and PTSTPRNT is a printer name or queue name.(This port in screenshot 1 created manually by selection LPR option)
  2. But when LPR command as add-printerport -Name "" -lprhostaddress "" -lprbytecounting -lprqueuename "PTSTPRNTR"
    is executed, LPR port is creating under TCP/IP port monitor as shown in screenshot 2. (Screenshot 2 port is created using command)

    111313-screenshot2.png In Screenshot 3 -> You can see the configuration of screenshot 2, Its with LPR option selected but as we can see in screenshot 2 Its under TCP/IP Port monitor only.
    Please advice on how we can create a LPR port as shown in screenshot 1.

Thanks and regards,
Swaroop Ramesh

Windows Server Printing
Windows Server Printing
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Printing: Printer centralized deployment and management, scan and fax resources management, and document services
592 questions
0 comments No comments
{count} votes

Accepted answer
  1. Leila Kong 3,676 Reputation points

    Hello @Ramesh, Swaroop ,

    Thanks for your query.

    1.Your powershell command "lprhostaddress", "lprbytecounting" and "lprqueuename" are used when installing a TCP/IP printer port in LPR mode.

    2.Please try the following command: Add-PrinterPort -ComputerName PrintServer -PrinterName $printer -HostName 'PrinterHostName'
    Quick Tip - Create New LPR Printers Using PowerShell:

    Best regards,

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

0 additional answers

Sort by: Most helpful