Run PowerShell as Administrator. Cmdlets come from the PrintManagement module (built in on current Windows).
Microsoft: Add-Printer · Add-PrinterPort
1. Shared printer (\\printserver\share)
Fastest when the printer is already shared on another PC or a print server.
Add-Printer -ConnectionName '\\printsrv01.contoso.com\HP-Lobby'
Restart the spooler only if the queue does not show up:
Restart-Service spooler
2. TCP/IP printer (fixed IP on the LAN)
a) Create a Standard TCP/IP port (use a unique port name per device):
Add-PrinterPort -Name 'IP_192.168.1.50' -PrinterHostAddress '192.168.1.50'
b) Pick a driver that is already installed:
Get-PrinterDriver | Where-Object { $_.Name -like '*PCL*' -or $_.Name -like '*Class*' } |
Select-Object -ExpandProperty Name
c) Add the queue (driver string must match Get-PrinterDriver exactly):
Add-Printer -Name 'Warehouse-Laser' -DriverName 'Microsoft IP Class Driver' -PortName 'IP_192.168.1.50'
Microsoft IP Class Driver is built in and fine for smoke tests. For production, install the vendor driver pack, then use its name from b (e.g. a PCL6 or PS queue for that model).
3. Check and remove
Get-Printer -Name 'Warehouse-Konica' | Format-List Name, DriverName, PortName, Shared
Remove-Printer -Name 'Warehouse-Konica'
Remove-PrinterPort -Name 'IP_192.168.1.50'
Skip Remove-PrinterPort if other printers still use that port.
4. If commands are missing
Get-Module -ListAvailable PrintManagement
Import-Module PrintManagement
On stripped-down images, Print Management / spooler features may need to be enabled in Optional features before the module works.