Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.1 KiB

  1. Out "Starting..."
  2. Set oLoc = CreateObject("WbemScripting.SWbemLocatorEx")
  3. Set oDT = CreateObject("WbemScripting.SWbemDateTime")
  4. Out "Created LocatorEx"
  5. Set oObj = oLoc.Open("umi://nw01t1/ldap/.dc=com/.dc=microsoft/.dc=nttest/.dc=nw01t1dom/.cn=Users/.cn=TimeStamp", _
  6. "nw01t1domnb\administrator", "nw01t1domnb")
  7. Out "Bound to .CN=TimeStamp"
  8. Out "Got Object " & oObj.Path_
  9. Set oProps = oObj.Properties_
  10. Out "accountExpires = " & oProps("accountExpires").Value & " (Should be 7/7/2000)"
  11. 'oDT.SetFileTIme oObj.accountExpires
  12. 'WScript.Echo oDT.GetFileTime
  13. 'WScript.Echo oDT.GetVarDate
  14. Out "badPasswordTime = " & oProps("badPasswordTime").Value & " (Should be ~7pm 5/24/2000)"
  15. oDT.SetFileTIme oObj.badPasswordTime
  16. WScript.Echo oDT.GetFileTime
  17. WScript.Echo oDT.GetVarDate
  18. oDT.SetFileTIme oObj.badPasswordTime, false
  19. WScript.Echo oDT.GetFileTime (false)
  20. WScript.Echo oDT.GetVarDate
  21. 'Out "lastLogon = " & oProps("lastLogon").Value & " (Should be ~7pm 5/24/2000)"
  22. 'Out "pwdLastSet = " & oProps("pwdLastSet").Value & " (Should be ~7pm 5/24/2000)"
  23. Sub Out(sLine)
  24. WScript.Echo sLine
  25. End Sub