raandree / NTFSSecurity

Managing permissions with PowerShell is only a bit easier than in VBS or the command line as there are no cmdlets for most day-to-day tasks like getting a permission report or adding permission to an item. PowerShell only offers Get-Acl and Set-Acl but everything in between getting and setting the ACL is missing. This module closes the gap.
MIT License
431 stars 61 forks source link

Get-NTFSSimpleAccess -ExcludeInherited includes inherited permission #12

Closed rodmhgl closed 7 years ago

rodmhgl commented 7 years ago

I would expect Get-NTFSSimpleAccess and Get-NTFSAccess to both implement the ExcludeInherited parameter the same way, but I get different results:

PS C:\scripts\ExplodedNTFS>  Get-NTFSSimpleAccess c:\temp -ExcludeInherited | ft

AccessControlType FullName Name Identity                      AccessRights
----------------- -------- ---- --------                      ------------
            Allow c:\           CREATOR OWNER          Read, Write, Delete
            Allow c:\           NT AUTHORITY\SYSTEM    Read, Write, Delete
            Allow c:\           BUILTIN\Administrators Read, Write, Delete
            Allow c:\           BUILTIN\Users                        Write
            Allow c:\           BUILTIN\Users                        Write
            Allow c:\           BUILTIN\Users                         Read

PS C:\scripts\ExplodedNTFS> Get-NTFSAccess c:\temp -ExcludeInherited | ft
PS C:\scripts\ExplodedNTFS>
raandree commented 7 years ago

Thanks, I will look into this.

raandree commented 7 years ago

The fix will be in the next release.