Manage printer permissions via powershell

Powershell printer management

Here is a script order to manage permissions on a printer.

# Script Download PrinterPermissions
$ URL = 'https://gallery.technet.microsoft.com/scriptcenter/' +
'Modify-Printer-Permissions-149ae172 / file / 116651/1 /' +
'Set PrinterPermissions.ps1'
$ Target = 'C: \ Temp \ Set-PrinterPermissions.ps1'
Start-BitsTransfer -Source $ URL -Destination $ Target

# Show help
Get-Help $ Target

# Open printer GUI
rundll32.exe printui.dll, PrintUIEntry / p / n “HP Color Laser MFP 178 179”

# Delete every authorization
$ PE = @ {
ServerName = 'Worker'
Remove = $ True
AccountName = 'Everyone'
SinglePrinterName = 'HP Color Laser MFP 178 179'
}
C: \ Temp \ Set-PrinterPermissions.ps1 @PE

# Add an AD security group to security
$ GP = @ {
ServerName = 'Worker'
AccountName = 'dwp.local \ IT'
AccessMask = 'Print'
SinglePrinterName = 'HP Color Laser MFP 178 179'
}
C: \ Temp \ Set-PrinterPermissions.ps1 @GP

# IT bosses are allowed to manage the documents
$ AD = @ {
ServerName = 'Worker'
AccountName = 'dwp.local \ ITAdmins'
AccessMask = 'ManageDocuments'
SinglePrinterName = 'HP Color Laser MFP 178 179'
}
C: \ Temp \ Set-PrinterPermissions.ps1 @AD

# Open printer GUI for checking
rundll32.exe printui.dll, PrintUIEntry / p / n “HP Color Laser MFP 178 179”

https://gallery.technet.microsoft.com/scriptcenter/Modify-Printer-Permissions-149ae172

Increase printer throughput