Hi I am trying to set the Expiry Date of a user in active directory, with a VBScript. I have found the following example and I am trying to test it:
The script seems to run OK, I don't get any errors, but when I look at the user account in users & computers, the expiry date is 19 February 2007 two days earlier then I specified.
If I query the value with a script then I get the date I entered ("21/02/2006").
Am I doing something wrong, or is this a bug. I have looked but I haven't found any mention of a bug.
btw I have just recently upgraded from WinXP SP1 to WinXP SP2.
Code:
Set objUser = GetObject("LDAP://cn=Username,ou=Users,dc=XXXXXXXX,dc=XXX")
objUser.AccountExpirationDate = CDate("21/02/2007")
objUser.SetInfo
The script seems to run OK, I don't get any errors, but when I look at the user account in users & computers, the expiry date is 19 February 2007 two days earlier then I specified.
If I query the value with a script then I get the date I entered ("21/02/2006").
Am I doing something wrong, or is this a bug. I have looked but I haven't found any mention of a bug.
btw I have just recently upgraded from WinXP SP1 to WinXP SP2.