Windows LPR Printer

First off, you probably shouldn't be doing this, LPR/LPD has been deprecated in Windows since Server 2012. However, it is still useful in a mixed environment.

On-prem Windows Print Servers and macOS clients are going to want to use LPD (if you don't want to use IPP and installing IIS on top just to serve the queues). Another scenario is Azure AD joined only devices without ADConnect Sync to on-prem AD with on-prem domain print servers. You might ask why this specific scenario and I won't tell ya.

Not ready for cloud printing solution yet? Here's something you can use with your deployment system. Assuming your print server is serving LPD already, here's the gist of what's needed.


Step 1. Enable LPR Port Monitor on your Windows workstations.
Dism /online /Enable-Feature /FeatureName:Printing-Foundation-LPRPortMonitor /All



Step 2. Install your Print Drivers on the local workstations. This script assumes your script is in the same folder as your .inf driver. You have to use pnputil.exe to install the actual driver first, then you have use Add-PrinterDriver and call it by its full name only. Replace the INF and Driver Name to your own.
Start-Process -FilePath "C:\Windows\System32\pnputil.exe" -ArgumentList "/add-driver `"$PSScriptRoot\disk1\RICSETUP64.INF`" /install /subdirs" -Wait -NoNewWindow
Add-PrinterDriver -Name "PS Driver for Universal Print"



Step 2a. If you are using SCCM, here's a detection method you may use for this Ricoh Universal Driver. Replace the driver name and version to your own; you might need to write your own $ver conversion.
$InstalledVersion = (Get-PrinterDriver -Name "PS Driver for Universal Print" -ErrorAction SilentlyContinue).DriverVersion
$ver = ((3..0 |ForEach-Object { ($InstalledVersion -shr ($_ * 16)) -band 0xffff }) -join '.')
$MinVersion = [version]"4.32.0.0"

If ($InstalledVersion) {
  If ([version]$ver -ge $MinVersion) { Write-Host "Installed" }
  Else { }
}
Else { }



Step 3. Install the Printer. Use your deployment system to depend on Step 2 to keep things updated. Note the colon in the PortName between server and printer name.
Add-PrinterPort -HostName $PrintServer -PrinterName $PrinterName
Add-Printer -Name $PrinterName -PortName "$PrintServer:$PrinterName" -DriverName "PS Driver for Universal Print"




That's it, no restart required. Don't look so shocked.