Example: Search for Password History in Specific Time Period
The following Visual Basic Scripting Edition (VBScript) example shows how to search for a history of password changes that occurred on the server between 2003-08-01 and 2005-08-01. You must be logged on as a member of the MIISAdmin or MIISBrowse security group in order to use the classes in this script.
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
Send comments about this topic to Microsoft
Build date: 2/16/2009