WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ADSI
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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)


Article ID:   W15393
File Created: 2003:05:13:11:27:26
Last Updated: 2003:05:13:11:27:26