- A Mind for Numbers
- Accelerate
- Agile Project Management for Dummies
- Algorithms to Live By
- Atomic Habits
- AWS Certified Cloud Practitioner Study Guide
- Banking on It
- Brexitland
- Build Your Dream Network
- Bulletproof SSL and TLS
- Business Analysis
- Collapse
- CompTIA Security+ Practice Tests
- CompTIA Security+ Study Guide
- Corporate Rebels
- Countdown to Zero Day
- Creative Acts for Curious People
- Creative DIY Microcontroller Projects with TinyGo...
- Cryptanalysis
- Crypto Trader
- Cryptography
- Culture Code
- Daniel Goleman Omnibus
- Deep and deliberate delegation
- Dhl
- Drive
- Effective Python
- Every Tool's a Hammer
- Exam Ref AZ-900 Microsoft Azure Fundamentals
- Expert Scripting and Automation for SQL Server...
- Fifty Quick Ideas to Improve Your User Stories
- Fixing Your Scrum
- Fundamentals of ServiceNow Administration and...
- Future Leader
- Future of Violence - Robots and Germs, Hackers and...
- GCHQ Puzzle Book
- Getting Things Done
- Harvard Business Review manager's handbook
- Hooked
- How Google Works
- How to Take Smart Notes
- How to Win Friends and Influence People
- HTML and CSS
- I Think, Therefore I Am
- Itsm Value Streams : Transform Opportun
- JavaScript and jQuery
- Kill It with Fire
- Leaders Eat Last
- Leading change
- Leading Without Authority
- Lean Thinking
- LONDON'S UNDERGROUND.
- Managing Successful Projects Prince2
- Managing Successful Projects with PRINCE2
- Measure What Matters : OKRs
- Meteorology today
- Mindf*ck
- Modern Cryptanalysis
- Modernist cuisine at home
- Money Revolution
- Never Split the Difference
- New One Minute Manager
- Open Circuits
- Oversubscribed
- Permanent Record
- PHP 5 advanced
- Practical Docker with Python: Build, Release and...
- Practical electronics for inventors
- PRINCE2 for dummies
- Pro Python 3: Features and Tools for Professional...
- Pro SQL Server Always On Availability Groups
- Pro SQL Server on Linux: Including Container-Based...
- Professional Scrum Master Guide
- Project to Product
- Radical Simplicity
- Rules of People
- SAFe 5.0 Distilled
- Sapiens
- SEARCH INSIDE YOURSELF- TPB
- Secret Barrister
- Securing SQL Server: DBAs Defending the Database
- Site Reliability Engineering
- SQL Server 2017 Administration Inside Out
- Start with Why
- System Center Configuration Manager Current Branch...
- T-SQL Fundamentals
- Teach Yourself Electricity and Electronics,...
- Teach Yourself Setting Up a Small Business (Teach...
- Team Topologies
- The Art of Deception
- The art of invisibility
- The Chimp Paradox How Our Impulses And Emotions...
- The coaching habit
- The code book
- The Courage To Be Disliked
- The DevOps handbook
- The Epic Guide to Agile
- The Five Dysfunctions of a Team: A Leadership...
- The Go Programming Language
- The Golden Ratio
- The Introvert's Guide to the Workplace
- The Manager's Path
- The New Silk Roads: The Present and Future of the...
- The outward mindset
- The Phoenix Project
- The Professional Product Owner
- The Unicorn Project
- Turn The Ship Around!
- Visual Thinking
- Weapons of Math Destruction
- Who Moved My Cheese?
- Work Rules!
- Working Out Loud
- Writing An Interpreter In Go
- Wrong Fit, Right Fit
Powershell: Recursively List Folder NTFS Access Control Lists
This script will recursively list the NTFS Access Control Lists on folders in a large folder structure.
It outputs the non-inherited ACLs on each folder recursively and shows where inheritance has been disabled. The NTFSSecurity module supports path lengths up to 32,768 characters.
The output formatting could do with some improvement. In the future, I am looking to dump this data into a database, instead of the console.
- PowerShell Version: 4
- Required PowerShell Module: NTFSSecurity
- Further Reading: Weekend Scripter: Use PowerShell to Get, Add, and Remove NTFS Permissions
[CmdletBinding()]
Param(
[Parameter(Mandatory=$True,Position=1)]
[string]$path
)
Import-Module NTFSSecurity
function ProcessChildren ([string]$path)
{
$children = Get-ChildItem2 $path -Directory
foreach ($child in $children)
{
ProcessChild $child.FullName
ProcessChildren $child.FullName
}
}
function ProcessChild ([string]$path, $excl=$True)
{
$header = "`r`n$($path)"
if ($excl -eq $True)
{
$acls = Get-NTFSAccess -ExcludeInherited $path
}
else
{
$acls = Get-NTFSAccess $path
}
if ($(Get-NTFSAccess $path).InheritanceEnabled -NotContains "True")
{
[console]::Writeline($header)
$header = ""
[console]::Writeline("Inheritance: Disabled")
}
if ($acls.Count -gt 0)
{
$aclmap = @{}
foreach ($acl in $acls)
{
$accessrights = $($acl.AccessRights -join ",")
$account = $acl.Account.AccountName
if ($exclude -NotContains $account)
{
if ($aclmap.ContainsKey($accessrights))
{
[void]$aclmap[$accessrights].Add($account)
}
else
{
[void]$aclmap.Add($accessrights, [System.Collections.ArrayList]@($account))
}
}
}
}
if ($aclmap.Keys.Count -gt 0)
{
if ($header)
{
[console]::Writeline($header)
}
foreach ($key in $aclmap.Keys | Sort)
{
$accounts = $($aclmap[$key] -join "`r`n".PadRight(42, ' '))
[console]::Writeline(" {0,-38}{1}", $key, $accounts)
}
}
}
$exclude = @("BUILTIN\Administrators", `
"CREATOR OWNER", `
"BUILTIN\Users", `
"NT AUTHORITY\SYSTEM")
ProcessChild $path $False
ProcessChildren $path