You often need to check AD accounts for lockouts, password expiration, or account expiration dates. This script gives you a quick view of these properties. Just change the Name in the script.
Get-ADUser -Filter 'Name -like "*sqlserver*" -Properties * | format-table userprincipalname, Enabled, lockedout, PasswordNeverExpires, PasswordExpired, AccountExpirationDate
To run the
Install-WindowsFeature -Name "RSAT-AD-PowerShell" -IncludeAllSubFeature
Comments
Post a Comment