Author Posts

December 13, 2017 at 4:53 am

Hi guys,

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 = ""

Add-PrinterPort -Name $PrinterPort3 -PrinterHostAddress $PrinterPort
Add-Printer -Name Barcode -DriverName "ZDesigner GK420d (EPL)" -PortName $PrinterPort3

December 13, 2017 at 5:58 am

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

Manage Printers

December 13, 2017 at 9:21 am

Thanks to answer postanote.