PowerTip: Use PowerShell to Find If Folder Inherits from Parent

Doctor Scripto

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 }

1 comment

Discussion is closed. Login to edit/delete existing comments.

  • Michael McNally 0

    >Get-NTFSAccessInheritance
    Get-NTFSAccessinheritance : The term ‘Get-NTFSAccessinheritance’ is not recognized as the name of a cmdlet, function,
    script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
    correct and try again.

    >get-module ntfssecurity
    ModuleType Version Name ExportedCommands
    ———- ——- —- —————-
    Script 4.2.6 NTFSSecurity {Add-NTFSAccess, Add-NTFSAudit, Clear-NTFSAccess, Clear-NTFSAud…

    ??

Feedback usabilla icon