Powershell PermissionSDDL

Bertrand_Pondi 21 Reputation points
2022-09-29T18:41:20.433+00:00

I used this powershell to add a security group call ''GRADM'' set on my printer ''IMP00107'' to all of my print servers which will set the group to have the Manage Documents permission but when I run the script security group is created and ather existing group in the printers are overwrited. Is it the way to add group ''GRADM'' and keep existing Group ?

$Printserver = "ps01"
$printsecurity = get-printer -computer $Printserver "IMP00107" -full

get-printer Printer002 -computer $Printserver | Foreach-Object {
set-printer $_.name -computer $Printserver -PermissionSDDL $printsecurity.PermissionSDDL
}

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,416 questions
0 comments No comments
{count} votes

Accepted answer
  1. Limitless Technology 44,021 Reputation points
    2022-10-03T07:48:24.247+00:00

    Hello there,

    If you want your existing security groups to be merged with the new security groups then you must create a nested group. You can add an existing Security Group to another Security group (also known as nested groups), creating a member group (subgroup) and a parent group. The member group inherits the attributes and properties of the parent group, saving you configuration time.

    You can use Add-ADGroupMember to add a group to another group. Here's the syntax:

    http://technet.microsoft.com/en-us/library/ee617210.aspx

    Manage Azure Active Directory groups and group membership https://learn.microsoft.com/en-us/azure/active-directory/fundamentals/how-to-manage-groups

    --------------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept it as an answer–

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Rich Matheisen 45,186 Reputation points
    2022-09-29T21:31:37.94+00:00

    How are you adding the ACE for the group "GRADM" to the printer's SDDL?

    0 comments No comments

  2. Bertrand_Pondi 21 Reputation points
    2022-09-30T01:46:41.103+00:00

    I created group ''GRADM'' with AD, I added the group in one of my printer ''IM00107'' after that I used the script to add that group with all PermissionSDDL(ACL) to all my others printers. The way is the script add the group on all printers but other existing groups are deleted