Skip to content

Instantly share code, notes, and snippets.

View johannbelau's full-sized avatar

Johann Belau johannbelau

View GitHub Profile
@johannbelau
johannbelau / 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