accountexpires attribute
hi people,I have a problem working whit ILM "2", i need set in active directory accountexpires attribute = datetime(now) + 90 days.I don't know nothing about "Code" but i need do this. if someone have one article step by step to do this i really appreciate it.Thank you in advance.
January 27th, 2010 3:32pm
Hi Pablo...I used a code ina a rule extension to do this..."The accountExpires attribute of the user object is data type Integer8. Integer8 values are 64-bit (8-byte) numbers representing dates as the number of 100-nanosecond intervals since 12:00 AM January 1, 1601. One 100-nanosecond interval is 0.0000001 seconds. It sounds like that should be a huge number, and that’s why it requires a 64-bit value. 12:00 AM January 1, 2006, works out to be 127,805,472,000,000,000 100-nanosecond intervals since 12:00 AM January 1, 1601." (from internet)the code used was:csentry["accountExpires"].value = DateTime.Now.AddDays(90).ToFileTimeUtc().ToString(); (in C#)ToFileTimeUtc() converts the date Now + 90 days to the format supported of accountexpires field in AD.Cheers,***** Paulo H. Campos - So Paulo/Brasil *****
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2010 3:21pm