Why password expiration date is not showing for users migrated using ADMT tool with same password as source?
Hello Team,
I am using below mentioned script for finding password expiration date for user migrated using ADMT tool with same password as source:
Get user details for a specific user whose password is going to expire within a specified days
Specify the username for which you want to retrieve details
$username = "GSLV" # Replace "username" with the actual username
Retrieve details for the specified user
$UserDetails = Get-ADUser -Identity $username -Properties "DisplayName", "UserPrincipalName", "msDS-UserPasswordExpiryTimeComputed" |
Select-Object -Property "DisplayName", "UserPrincipalName", @{
Name = "PasswordExpiryDate"
Expression = {
[datetime]::FromFileTime($_."msDS-UserPasswordExpiryTimeComputed")
}
}
Output the user details
$UserDetails Note :
- When I am running this script in source domain before user migration I am getting expected result successfully but when I am running this script in target after user migrated in target with password same as source domain using ADMT tool I am getting inaccurate result each time as mentioned in screenshot.image.png
- But when I am migrating user with complex password in that case script works fine. What the reason for this?
Thanks!