How to Check if a User Account Is Locked in PowerShell (AD and Local)
To check if a user account is locked in PowerShell, read the LockedOut property. For an Active Directory user, it’s one line with the ActiveDirectory module: For a local account on a Windows PC, the Lockout property of Win32_UserAccount tells you the same thing. Below I cover both, plus finding where a lockout came from, … Read more