- Windows Server 2016 Automation with PowerShell Cookbook(Second Edition)
- Thomas Lee
- 71字
- 2021-07-02 18:16:02
Getting ready
This recipe needs a second shared printer, SGBRCP1, set up as follows:
$PtrName = 'Sales_Branch_Color'
$PtrIP = '172.16.1.61'
$DrvName = 'NEC Color MultiWriter Class Driver'
Add-PrinterPort -Name $ptrname `
-PrinterHostAddress $PtrIP
Add-PrinterDriver -Name $DrvName `
-PrinterEnvironment 'Windows x64'
Add-Printer -Name 'SGBRCP1' `
-DriverName $DrvName `
-Portname 'Sales_Branch_Color'
Set-Printer -Name 'SGBRCP1' -Shared $true `
-Published $true
This second printer is a branch office printer for which you enable BODP printing.