This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Get the date and time of an Active Directory user account given the username | |
| # | |
| # If the password is going to expire in the next 30 days the script will exit with | |
| # 1, otherwise it will exit with 0. | |
| # If the password is set to never expire, the script will return "Never" | |
| # If the user account is not found, the script will return "Not Found | |
| # Usage: Get-ADUserPasswordExpiration.ps1 -Identity <username> | |
| # Example: Get-ADUserPasswordExpiration.ps1 -Identity jsmith | |
| [CmdletBinding()] |
OlderNewer