Created
November 7, 2019 08:18
-
-
Save wim-beck/684e596aeb72096843f63283dc53dd19 to your computer and use it in GitHub Desktop.
Get the password expiration date for an AD user
This file contains 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
param($AccountName) | |
Get-ADUser $AccountName -Properties displayname,msDS-UserPasswordExpiryTimeComputed | Select-Object -Property "Displayname",@{Name="ExpiryDate";Expression={[datetime]::FromFileTime($_."msDS-UserPasswordExpiryTimeComputed")}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment