Forum Discussion
bikhod
Apr 16, 2020Copper Contributor
How to determine if a local account is locked?
Hi, Within minutes of searching, I was able to find the script below which determines if an Active Directory account is locked: Get-ADUser myaccount -Properties LockedOut | Select -Object Loc...
VasilMichev
Apr 16, 2020MVP
Locked has a different meaning in AD, compared to Azure AD (where it basically means "blocked"). So depending on which one you're after, check either the lockoutTime attribute or the relevant "bit" of the UserAccountControl attribute: https://support.microsoft.com/en-ca/help/305144/how-to-use-useraccountcontrol-to-manipulate-user-account-properties
- bikhodApr 29, 2020Copper Contributor