Password never expires status

Password never expires status

Description

With this little script, you will have a status on the user account “Password never expires” flag. This check is done on a specific OU. You can adapt the script to run it on a domain-wide.

The principe of the script is simple :

  • first, list all the user account with the “Password never expires” flag
  • after that, list all the user accounts
  • and finally, compare both lists created above to get the status
Script

The powershell cmdlet search-adaccount is very useful. It can used also to perform these tasks :

You can find more information with this powershell cmdlet here.

For the get-aduser cmdlet, you can go here.


My Powershell script categories

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.