Active Directory · PowerShell

Powershell and Active Directory: Finding User whose password is Expired.

Hi,

Yesterday i have got a call from my remote user, she is  saying that she is not able to login to the Intranet System and Outlook, I asked her if she has got any notifications about password failed (Setting using Group Policies). and she denied.

i said “OK”..

Somehow i feel this is related to her password, i thought let’s see if her password is expired or not.

The best way to check this is using “Powershell”

I opened my Powershell Console.

I imported my ActiveDirectory Module ( Import-Module ActiveDirectory )

and i shoot the command line.

Get-ADUser UserName -Properties *

14-01-2013 13-00-55

and when i scrolled down and i  seen “PasswordExpired : True

14-01-2013 13-00-19

and i call that lady over the phone and  told her to change her password.

You can also use this command line to find all users those password are expired.

Get-ADUser -Filter ‘PasswordExpired -eq $true’

All Sorted… and i live “happily ever after” (till the second problem hit me Winking smile)

I love Powershell.

Thanks

Aman Dhally

 

clip_image001 clip_image002 clip_image003 clip_image005 clip_image007

2 thoughts on “Powershell and Active Directory: Finding User whose password is Expired.

  1. Its better to include the Active-Directory Module in your Power-Shell Profile, rather than doing “Import-Module ActiveDirectory” everytime. It makes your life easier.. 🙂 My two cents..

    1. Hi AP.

      Yes I know that 😛 , but for demo purpose, it always good to show the things from scratch 🙂
      2 Cents? what about a Coffee. 🙂

      Thanks .
      Aman ,

Comments are closed.