Public/Get-LockedAccounts.ps1
function Get-LockedAccounts { <# .Synopsis -Taylor Lee Modified 05172019 .Description Return a list of Locked Active Directory Accounts .Notes Requires the Active Directory Module .Link Get-DCLockoutEvents2 Get-PasswordExpired Set-Password Unlock-Account Unlock-AllAccounts #> Import-Module ActiveDirectory Search-ADAccount -Lockedout | Select-Object Name, SamAccountName, UserPrincipalName | Sort-Object Name | Format-Table -AutoSize } |