This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$array = New-Object System.Collections.ArrayList | |
#アクセス権一覧を取得するパス | |
$targetDir = "C:\" | |
#結果を出力するCSVパス | |
$exportCSVPath = "D:\acl.csv" | |
#全てのサブディレクトリのみ | |
#ファイルも出力したい場合には、「 Where { $_.PSIsContainer } |」を | |
#削除する | |
Get-ChildItem -Recurse -Path $targetDir | Where { $_.PSIsContainer } | |