Skip to content

Instantly share code, notes, and snippets.

View prof-trial-and-error's full-sized avatar

Prof. Trial and Error prof-trial-and-error

View GitHub Profile
@prof-trial-and-error
prof-trial-and-error / ntfspermissions.ps1
Created August 13, 2018 13:24
Managing NTFS folder security with PowerShell module NTFSSecurity
#First, show the script which directory
$directory = "\\<HOST>\<Dir>\"
#[Optional!] Inside the directory defined above filter for folders you want to check
$folders = Get-ChildItem $Directory -Directory | Where-Object { $_.Name -like "XXXX??" }
#now go through each folder in that directory
foreach ($folder in $folders)
{
Write-Host $folder