PowerTip: Use PowerShell to Find If Folder Inherits from Parent


Summary: Use Windows PowerShell to determine if an NTFS folder inherits from its parent folder.

Hey, Scripting Guy! Question How can I use Windows PowerShell to determine if an NTFS folder inherits from its parent folder?

Hey, Scripting Guy! Answer Use the Get-NTFSAccessInheritance cmdlet provided by the NTFSSecurity module, for example:

Get-NTFSAccessInheritance -Path C:\Windows

Or if you want to query multiple folders:

dir -Recurse | Get-NTFSAccessInheritance | Where-Object { -not $_.InheritanceEnabled }


Comments (2)

  1. Anonymous says:

    The JV version is maybe shorter but not easier to read. Only advantage: you don’t have to install the NTFSSecurity module

  2. JV says:

    Short form.
    ([io.DirectoryInfo]’c:windows’).GetAccessControl().AreAccessRulesProtected

Skip to main content