Returns information about the MyerKen user account object in Active Directory.
Set objUser = GetObject _("GC://cn=MyerKen,ou=Management,dc=NA,dc=fabrikam,dc=com")strWhenCreated = objUser.Get("whenCreated")strWhenChanged = objUser.Get("whenChanged")Set objUSNChanged = objUser.Get("uSNChanged")dblUSNChanged = _Abs(objUSNChanged.HighPart * 2^32 + objUSNChanged.LowPart)Set objUSNCreated = objUser.Get("uSNCreated")dblUSNCreated = _Abs(objUSNCreated.HighPart * 2^32 + objUSNCreated.LowPart)objUser.GetInfoEx Array("canonicalName"), 0arrCanonicalName = objUser.GetEx("canonicalName")WScript.echo "Canonical Name of object:"For Each strValue in arrCanonicalNameWScript.echo vbTab & strValueNextWScript.Echo vbCrWScript.Echo "Object class: " & objUser.Class & vbCrLfWScript.echo "When Created: " & strWhenCreated & " (Created - GMT)"WScript.echo "When Changed: " & strWhenChanged & " (Modified - GMT)"WScript.Echo VbCrLfWScript.Echo "USN Changed: " & dblUSNChanged & " (USN Current)"WScript.Echo "USN Created: " & dblUSNCreated & " (USN Original)"
This is a VB Script, this can be used by saving the file in .vbs file