Answers:
Set objUser = GetObject("LDAP://cn=ken myer, ou=Finance, dc=fabrikam, dc=com")
Wscript.Echo objUser.WhenCreated
Get-ADUser -Identity garys -Properties whenCreated
如http://www.windowsnetworking.com/上所示的更好的示例
DSQuery * “CN=TestUser,CN=Users,DC=<YourDomainName>, DC=<Com>” –Attr WhenCreated WhenChanged
您将获得详细信息,请检查以下内容。
对于用户帐户删除:
·在Windows 2003上,我们应获取事件ID:630·在Windows 2008上,我们应获取事件ID:4726
对于创建用户帐户:·在Windows 2003上,我们应获取事件ID:624·在Windows 2008上,我们应获取事件ID:4720
dsquery * -filter "(SamAccountName=jscott)" -attr Name whenCreated