Powershell GUI fronted (WPF) to run categorized console scripts

⌈⌋ branch:  ClickyColoury


Artifact [809076f97a]

Artifact 809076f97a75f35c57a0b14fdc0a53ee6460381d:

  • File tools/bulk/GetACLs.ps1 — part of check-in [08100351ec] at 2018-05-16 18:13:22 on branch trunk — Query permission groups for folders (Get-ACL) (user: mario size: 968)

# api: multitool
# version: 0.1
# title: Get-ACLs for dir
# description: list permitted groups to access a path
# type: inline
# category: bulk
# icon: folder
# vars:
#    { name: paths, type: text, value="\\our.central.dfs\Groups\XYUS-Checkins", description: Fetch ACL list for paths }
# hidden: 0
# status: beta
# config: -
#
# Get group permissions for path
#
#  ❏ either single or list of path (one per line, or semicolon-separated)
#


Param(
    $paths = (Read-Host "Paths"),
	$filter = "^(BUILTIN|NT AUTH)|Administrators|\\evservice"
);

$paths = $paths -split "(\s*[\n;]\s*)+" | ? { $_ -match "\\\\\w+" }

ForEach ($p in $paths) {
     Write-Host -f Yellow "📂 $p"
     try {
	     $a = (Get-Acl $p).Access | ? { $_.IdentityReference -notmatch $filter }
		 ($a |Select IdentityReference, FileSystemRights | FL | Out-String).trim() | Write-Host
	 }
	 catch {
	     Write-Host -f Red "✘ no acl found (Nasuni?)"
	 }
}