Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


Setting Expiry Date on AD Account

 Keywords:  set expire date active directory account

Question:

Please can you advise how I can set the Expiry date on an AD account. Using ADSI extender to create the account but unsure how to set "AccountExpires" attribute. It is an Integer8 field not a time field.

12th Dec 2003 translates to 126871488000000000 if you look at attribute when set manually.

Answer:

The extender knows how to handle this field. Just use the standard WIL YMDHMS time as field value. For example:
sValue = "2002:12:30:01:59:00"
dsSetProperty(sAdsiPath, "accountExpires", sValue)