Option Explicit
On Error Resume Next
Set Service = GetObject("winmgmts:root\MicrosoftIdentityIntegrationServer")
TimeStart = "2003-08-01 03:25:07.221"
TimeEnd = "2005-08-01 03:25:07.226"
Set Targets = Service.ExecQuery( "Select * from MIIS_PasswordChangeHistoryTarget where " &_
"MIISReceiveTime > '" & TimeStart & "' and MIISReceiveTime < '" & TimeEnd & "'")
For Each objtarget in Targets
Wscript.echo objtarget.ReferenceGuid
Wscript.echo objtarget.RetryCount
Wscript.echo objtarget.AttemptDetails
Wscript.echo objtarget.MaGuid
Wscript.echo objtarget.LastAttemptTime
Next
Sub ErrorHandler (ErrorMessage)
WScript.Echo ErrorMessage
WScript.Quit(1)
End Sub