2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

powershell_フォルダアクセス権出力

Last updated at Posted at 2020-12-02

①Windows PowerShellで特定フォルダ配下のフォルダアクセス権をCSVに出力する
フォルダ[sales2]フォルダアクセス権を出力

cd C:\inetpub\wwwroot\sales2
#sales2アクセス権だけを出力
Get-Acl | Select-object @{Label="Path";Expression={Convert-Path $_.Path}}, Owner, AccessToString |Export-Csv C:\inetpub\wwwroot\output.csv

#sales2子フォルダのアクセス権も一緒に出力
Get-ChildItem -Force -Recurse |where { $_.mode -match "d" } |Get-Acl | Select-object @{Label="Path";Expression={Convert-Path $_.Path}}, Owner, AccessToString |Export-Csv C:\inetpub\wwwroot\output.csv

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?