With this script you can troubleshoot ADUser accounts.
This script will do the following
Check status of users account
This function are checking the following things on a user and showing the results
- Is the account enabled?
- Is the account locked?
- Has the account expired?
- Has the password expired?
- When did the user last connect to the domain?
Checking it the user/users are locked and it the user/users are locked the script will unlock the user/users
Enable user or users
Checking if the user/users are disabled if the user/users are disabled the script will enable the user/users