The following Microsoft Visual Basic Scripting Edition (VBScript) example shows how to search for a history of password changes that occurred on the server between August 1, 2003 and August 1, 2005 (2003-08-01 and 2005-08-01). To use the classes in this script, you must be logged on as a member of the MIISAdmin or MIISBrowse security group in Forefront Identity Manager Synchronization Service (FIM Synchronization Service).
Visual Basic Script | Copy Code |
---|---|
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 |