/build/static/layout/Breadcrumb_cap_w.png

Verify When Windows Password was Changed

In our environment our user account group creates accounts using Novell eDirectory.We currently sync from eDirectory to our domain, but not the other way.We sometimes run into an issue when a user changes their password using their machine instead of a link provided that changes it in eDirectory. This causes issues with other shared sites were passwords are not synced up.

I've seen tools that will do this, but were not supported in Win 7 x64. To assist in troubleshooting I created a powershell script that will prompt for user ID, and it will return when the password was last changed on our domain. This was created from a variety of different Google searches with a few modifications to meet our needs. I thought I would share just in case anyone else has a similar wacky environment.

$user = read-host "Enter User ID"
$searcher=New-Object DirectoryServices.DirectorySearcher
$searcher.Filter="(&(samaccountname=$user))"
$results=$searcher.findone()
$changedtime = [datetime]::fromfiletime($results.properties.pwdlastset[0])
$c = "The user, $user has changed password last time at $changedtime"
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
[System.Windows.Forms.MessageBox]::Show($c)

 

 

After prompted for User ID this script will return a time stamp of when that password was last changed.


Comments

  • Good information shared, it will certianly help.... - ninjamasterpro 12 years ago
This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ