Announcement

Collapse
No announcement yet.

last password change

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • last password change

    hi, I need to find last password change by user.
    here is link to powershell command
    http://www.oxfordsbsguy.com/2013/11/...y-information/

    this is the final one (at the bottom)
    Get-ADUser -filter * -properties passwordlastset, passwordneverexpires | sort-object name | select-object Name, passwordlastset, passwordneverexpires | Export-csv -path c:\temp\user-password-info-20131119.csv

    where I have place ONE user name?

    thanks.

    "When you hit a wrong note it's the next note that makes it good or bad". Miles Davis

  • #2
    Change -filter * to something as -filter {SAMAccountName -eq "Account Name"}
    or,
    Change -filter * to -identity "Account Name"

    http://windowsitpro.com/systems-mana...ers-get-aduser

    This posting is provided "AS IS" with no warranties, and confers no rights.

    __________________

    ** Remember to give credit where credit's due **
    and leave Reputation Points for meaningful posts

    Comment


    • #3
      first suggestion works fine. Second - fails...
      out of curiosity, could you look what with failed one:

      PS C:\WINDOWS\system32> Get-ADUser -filter {SAMAccountName -eq "ma1"} -properties passwordlastset, passwordneverexpires | sort-object name | select-obj
      ect Name, passwordlastset, passwordneverexpires | Export-csv -path c:\temp\user-password-info-june8_2016.csv
      PS C:\WINDOWS\system32>
      PS C:\WINDOWS\system32> Get-ADUser -identify "ma1" -properties passwordlastset, passwordneverexpires | sort-object name | select-object Name, passwordl
      astset, passwordneverexpires | Export-csv -path c:\temp\user-password-info-june8_2016.csv
      Get-ADUser : A parameter cannot be found that matches parameter name 'identify'.
      At line:1 char:12
      + Get-ADUser -identify "ma1" -properties passwordlastset, passwordnever ...
      + ~~~~~~~~~
      + CategoryInfo : InvalidArgument: ( [Get-ADUser], ParameterBindingException
      + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.ActiveDirectory.M anagement.Commands.GetADUser

      PS C:\WINDOWS\system32>

      "When you hit a wrong note it's the next note that makes it good or bad". Miles Davis

      Comment


      • #4
        the output shows last password change and for "passwordneverexpires" - FALSE
        In user account settings GUI Password Never Expires is checked. Shouldn't the command output show TRUE?
        Thanks.
        ********************
        #TYPE Selected.Microsoft.ActiveDirectory.Management.ADUs er
        Name passwordlastset passwordneverexpires
        user 6/8/2016 8:32 FALSE
        "When you hit a wrong note it's the next note that makes it good or bad". Miles Davis

        Comment

        Working...
        X