$a = Get-Acl g:\daten\kunden
Rechte als NT-Konten holen
$aces =$a.access
entspricht: $aces =$a.GetAccessRules($true, $true, [System.Security.Principal.NTAccount])
Write-Host "Alle Regeln:" -F yellow
foreach ($ace in $aces)
{
write-host $ace.IdentityReference.ToString() "hat Zugang" $ACE.FileSystemRights $ACE.AccessControlType "Vererbt?" $ACE.IsInherited
}
$aces =$a.GetAccessRules($true, $false, [System.Security.Principal.SecurityIdentifier])
Write-Host "Nur die expliziten Regeln, in SID-Form:" -F yellow
foreach ($ace in $aces)
{
write-host $ace.IdentityReference.ToString() "hat Zugang" $ACE.FileSystemRights $ACE.AccessControlType "Vererbt?" $ACE.IsInherited
}