get-acl 'Inherited From'

Welcome Forums General PowerShell Q&A get-acl 'Inherited From'

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

1 year, 11 months ago.

  • Author
  • #71933

    Topics: 21
    Replies: 30
    Points: 0
    Rank: Member

    I am trying to find for each ACE how to determine where it's permissions are inherited from. I cant seem to find the actual folder it is inherited from in get-acl...

    Here is a pic to better illustrate what i'm talking about...Image

  • #71987

    Topics: 2
    Replies: 376
    Points: 0
    Rank: Member

    You need to walk up the tree and find all not inherited permissions.
    and then analyze it
    something like that

    function Get-NotInheritedACL($Path) {
    	Get-Acl -Path $path |
    	 Select-Object -ExpandProperty Access |
    	 Where-Object { -Not $_.IsInherited } |
    	 Foreach-Object {
    			Path = $Path
    			Access = $_
    	$parent = Split-Path $Path
    	if ($parent) {
    		Get-NotInheritedACL $parent
    Get-NotInheritedACL 'C:\Program Files\Common Files\Microsoft Shared\'

The topic ‘get-acl 'Inherited From'’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort