Why password expiration date is not showing for users migrated using ADMT tool with same password as source?

Shreya Kumari 0 Reputation points
2024-02-29T11:56:11.94+00:00

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 :

  1. 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
  2. But when I am migrating user with complex password in that case script works fine. What the reason for this?

Thanks!

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,432 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.