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.

Problem Getting and Settind the AccountExpires Active Directory Property


Question:

I think there is a bug in the ADSI Extender when setting & using the dsgetproperty command to retrieve a users account expiry date (AD attribute= AccountExpires)

If I have a date set (done using Active Directory Users & Computers) to 1st Dec 2004 then when using dsgetproperty to retrieve the date it comes back as 2nd of Dec (1 day out).

If I set a date of 31st Dec using DSSeproperty and then look in ADUC it shows the date as 29th Dec 2004. This is 2 days out.

If I retrieve the date using DSgetproperty after setting it using dssetproperty the dates are OK but not when looking via ADUC.

Can someone look in to this as this seems to be a bug to me.

Answer:

That particular area of the extender has not changed since the extender was written. The extender uses the current time on the computer running the script to convert to UTC. The conversion work is done by system APIs so there is little opportunity for the extender to mess things up. No one has complained until known but it is possible that there is something amuck.

Found the following in MSFT documentation:

"The Account Expires control displays the date that the account will expire at the end of. The accountExpires attribute is stored 
as the date that the account expires on. Because of this, the date displayed in the Account Expires control will be displayed as 
one day earlier than the date contained in the accountExpires attribute."


Article ID:   W16321
File Created: 2005:02:18:12:19:48
Last Updated: 2005:02:18:12:19:48