Skip to content

Commit

Permalink
Merge pull request #1 from mdavis332/fix/lockoutThreshold
Browse files Browse the repository at this point in the history
Fix account lockout threshold sort logic
  • Loading branch information
mdavis332 authored Oct 8, 2020
2 parents 1c550cb + 9ac1fe3 commit fb95ce8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion private/Get-DomainPasswordPolicy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function Get-DomainPasswordPolicy {

# Generate a userlist from the domain
# Selecting the lowest account lockout threshold in the domain to avoid locking out any accounts.
[int]$SmallestLockoutThreshold = $AccountLockoutThresholds | Sort-Object | Select-Object -First 1
[int]$SmallestLockoutThreshold = $AccountLockoutThresholds -replace 0, 9999 | Sort-Object | Select-Object -First 1

$AcctLockoutThreshold = @{Name = 'Account Lockout Threshold (Invalid logon attempts)'; Expression = { $SmallestLockoutThreshold } }

Expand Down

0 comments on commit fb95ce8

Please sign in to comment.