15 lines
497 B
PowerShell
15 lines
497 B
PowerShell
Import-Module ACLReportTools
|
|
$WorkDir="$env:LOCALAPPDATA\ps-aclreport"
|
|
|
|
function createBaselineReport($Computer, $Share){
|
|
$ShareName="${Computer}-${Share}"
|
|
$Date=(Get-Date).ToString("yyyyMMddHHmm")
|
|
$BaselineName="Baseline_${ShareName}_${Date}"
|
|
New-ACLShareReport -ComputerName $Computer -Include $Share -IncludeInherited | Export-ACLReport -Path "${Workdir}\${BaselineName}.acl" -Force
|
|
}
|
|
|
|
function pruneBaselineReports(){
|
|
|
|
}
|
|
|
|
createBaselineReport "nas.proferis.local" "techniczny" |