Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Need to Know the Date When an AD Object was disabled

$
0
0

Hi Guys, I need to know when -- on which date -- an AD User-Account was disabled.

I can use the LDAP Filter to list all disabled User-Accounts. No problem here. But, I also need to know on which date these accounts were disabled. Please help.

I can use the "WhenChanged" attribute to know when the account was last modified. The below code will give me the date when the object was last modified.

Set objUser = GetObject("LDAP://cn=ken myer, ou=Finance, dc=fabrikam, dc=com")
WScript.Echo objUser.WhenChanged

But that does not give me the exact date on which the account was "Disabled". I need to know the date on which the Ad account was "Disabled" -- User Account Or Computer account any one will do.

Please help ! Any suggestion or pointer is greatly appreciated.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>