Show the current bad password count for an Active Directory user

Use this powershell script to display the current bad password count for all Active Directory user accounts: # Import active directory modules import-module activedirectory; # Get all domain controllers $dcs = get-adcomputer -filter * -searchbase “ou=domain controllers,dc=kamal,dc=local”; # Get all users – change “-filter {enabled -eq $true}” to a username to get just one user […]

Read More

View when an Active Directory account password will expire

How to find out when an Active Directory user account password is due to expire, here is a easy powershell script which will display when each users AD account is due to expire: Get-ADUser -filter {Enabled -eq $True -and PasswordNeverExpires -eq $False} -Properties “DisplayName”, “msDS-UserPasswordExpiryTimeComputed” | Select-Object -Property “Displayname”,@{Name=”ExpiryDate”;Expression={[datetime]::FromFileTime($_.”msDS-UserPasswordExpiryTimeComputed”)}}

Read More