Setting Printer Permissions by Using Powershell
I have a print server and I want to add a new printer by using Powershell. I have a script to do this however there is a important problem for me. I want to remove 'everyone' from printer permission settings and I want to add new user such as 'domain\user1'. Is there anyway to do this.
My script is below, it works but in addition i need to set permission settings.
$PrinterPort3 = "10.20.80.188"
Add-PrinterPort -Name $PrinterPort3 -PrinterHostAddress $PrinterPort
Add-Printer -Name Barcode -DriverName "ZDesigner GK420d (EPL)" -PortName $PrinterPort3
See these examples:
Add Printer Permission
Add Printer Permission using Security Definition Description Language (SDDL). The function adds full controll rights to the SDDL. Use Get-Printer and Set-Printer to modify Printer Permission on local and Remote Computers. Requires Microsoft PS Module PrintManagement.
Modify Printer Permissions
This script was created to modify the DACL of printer objects. It can be used to add specific permissions or remove permissions from printers on the localhost or a specified server. It accepts access masks, such as "ManageDocuments", in either text or integer based format.
Weekend Scripter: Add Security Groups to Print Servers by Using PowerShell
Thanks to answer postanote.
You must be logged in to reply to this topic.