Setting Printer Permissions by Using Powershell

Welcome Forums General PowerShell Q&A Setting Printer Permissions by Using Powershell

This topic contains 2 replies, has 2 voices, and was last updated by

 
Participant
1 year ago.

  • Author
    Posts
  • #88997

    Participant
    Points: 1
    Rank: Member

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

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

  • #89008

    Participant
    Points: 320
    Helping Hand
    Rank: Contributor

    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.
    'gallery.technet.microsoft.com/scriptcenter/Add-Printer-Permission-c0ece1f3'

    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.
    gallery.technet.microsoft.com/scriptcenter/Modify-Printer-Permissions-149ae172'

    Weekend Scripter: Add Security Groups to Print Servers by Using PowerShell
    'blogs.technet.microsoft.com/heyscriptingguy/2014/08/10/weekend-scripter-add-security-groups-to-print-servers-by-using-powershell'

    Manage Printers
    'blog.bjornhouben.com/2013/07/13/powershell-manage-printers'

  • #89078

    Participant
    Points: 1
    Rank: Member

    Thanks to answer postanote.

The topic ‘Setting Printer Permissions by Using Powershell’ is closed to new replies.