I need to change the pwdLastSet attribute on accounts in Active
Directory. I found this script which will change the value to 0 which
means the user must change their password at next log on. But we are
implementing a new pwd policy to force users to change their pwd after
180 days. Most of our users pwd's are older than that and we don't want
them all expiring on that day. So, I need to be able to bulk set the
pwdLastSet value to %today's date%.
Here is my idea:
set oUser = GetObject("LDAP://cn=user,ou=test,dc=domain,dc=com")
oUser.Put "pwdLastSet", CLng(127703193192000000)
oUser.Setinfo
(We reverse engineered the Integer 8 number to be approx Sept 1, 2005,
hence the value 127703193192000000)
But when I run this I get an error Overflow: 'CLng'
Has anyone ever done this before? Setting the pwdLastSet value to
something other than 0?