Hello @Anonymous ,
Thanks for your query.
1.Your powershell command "lprhostaddress", "lprbytecounting" and "lprqueuename" are used when installing a TCP/IP printer port in LPR mode.
Add-PrinterPort: https://learn.microsoft.com/en-us/powershell/module/printmanagement/add-printerport?view=windowsserver2019-ps
2.Please try the following command: Add-PrinterPort -ComputerName PrintServer -PrinterName $printer -HostName 'PrinterHostName'
Quick Tip - Create New LPR Printers Using PowerShell: https://thomasrayner.ca/quick-tip-create-new-lpr-printers-using-powershell/
Best regards,
Leila
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.