Skip to content

Commit 24fbdd1

Browse files
committed
Update Get-user-permissions-objects-ACL.ps1
1 parent 2fbb67f commit 24fbdd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

powershell-scripts/Get-user-permissions-objects-ACL.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Write-Host "Checking permissions on objects..." -ForegroundColor Yellow
2121
foreach ($obj in $adObjects) {
2222
try {
2323
# Get the ACL for the current object
24-
$acl = Get-Acl "AD:$($obj.DistinguishedName)"
24+
$acl = Get-Acl "AD:$($obj.DistinguishedName)" -ErrorAction SilentlyContinue
2525

2626
# Filter ACL entries for the current user
2727
$userPermissions = $acl.Access | Where-Object {

0 commit comments

Comments
 (0)