Skip to content

Instantly share code, notes, and snippets.

$array = New-Object System.Collections.ArrayList
#アクセス権一覧を取得するパス
$targetDir = "C:\"
#結果を出力するCSVパス
$exportCSVPath = "D:\acl.csv"
#全てのサブディレクトリのみ
#ファイルも出力したい場合には、「 Where { $_.PSIsContainer } |」を
#削除する
Get-ChildItem -Recurse -Path $targetDir | Where { $_.PSIsContainer } |