get-acl for AD securtiy group permissions

pma111
pma111 used Ask the Experts™
on
what would the correct get-acl syntax be for getting the ACL on who can manage an AD security group. I've only used get-acl for folder permissions, e.g. get-acl \\server\share - But I have read you can use it for checking permissions on AD objects to, so knowing the correct format for that would be useful to check for delegations etc.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2018
Distinguished Expert 2018
Commented:
Basically the same way it works with NTFS: you pass the path to the target, and check the Access property.
The path in this case is the drive "AD:" and the object's DistinguishedName.
For starters, you can send the output to Out-GridView, for example:
Get-Acl -Path 'AD:\CN=Some Group,OU=Some OU,DC=domain,DC=com' | Select-Object -ExpandProperty Access | Out-GridView

Open in new window

To get delegation, a good start is filtering the IdentityReference for accounts starting with your AD's NetBIOS domain name:
Get-Acl -Path 'AD:\CN=Some Group,OU=Some OU,DC=domain,DC=com' | Select-Object -ExpandProperty Access |
	Where-Object {$_.IdentityReference.ToString() -like "$ENV:UserDomain\*"}

Open in new window


The permissions differ from NTFS, obviously. Start here, for example:
How Access Control Works in Active Directory Domain Services
https://docs.microsoft.com/en-us/windows/desktop/ad/how-access-control-works-in-active-directory-domain-services
Active Directory Object Permissions 101
https://redmondmag.com/articles/2001/10/01/active-directory-object-permissions-101.aspx
Michael B. SmithManaging Consultant

Commented:
oBdA is accurate enough.

I would suggest using dsacls.exe. It is uniquely designed for returning Directory Services ACLs.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial