Friday, July 2, 2010

Exporting Password Last Set & password expire property

We got a requirement that a list of users is needed with password last set & those who has a property of password never expires

we have run the below command :

csvde -f  c:\aduser.csv -r  objectclass=user -l "Cn,objectclass,pwdlastset,useraccountcontrol"

we imported the csv in excel , then the issue is converting the number into date format.

this can be done by number /(60*60*24*10000000)-109205)

then changing the cell format to display date.

Second thing is to find the users that have account never expires set.

This can be achieved by finding the number  66048 under column user account control.

1 comment:

  1. Great.. It worked.
    But value 9223372036854780000 and 0 in account expiry column has originally set to never.
    As you said above 66048 is not giving valid option. :)

    This is good. Thanks

    ReplyDelete