Partager via


How to: Remove Password Change Histories from the FIM Synchronization Service Server

The MIIS_Server Class class provides methods that allow you to remove old password histories from the Forefront Identity Manager Synchronization Service (FIM Synchronization Service) server.

The following Microsoft Visual Basic Scripting Edition (VBScript) example shows how to remove password histories that have a date that is earlier than or equal to March 31, 2003 (2003-03-31) from the server, and to clear any outstanding password operations in the password queue. To use the classes in this script, you must be logged on as a member of the MIISAdmins security group.

Option Explicit

On Error Resume Next

Dim Service
Dim Server
Dim ManagementAgent
Dim DeleteDate

Set Service = GetObject("winmgmts:\root\MicrosoftIdentityIntegrationServer")
Set Server = Service.Get("MIIS_Server.Name='MIIS_Server1'")

DeleteDate = "2003-03-31 13:25:00.000"

WScript.Echo "Result: " & Server.ClearPasswordQueue()
WScript.Echo "Result: " & Server.ClearPasswordHistory(DeleteDate)

Sub ErrorHandler (ErrorMessage)
  WScript.Echo ErrorMessage
  WScript.Quit(1)
End Sub

See Also

Reference

MIIS_PasswordChangeHistorySource Class
MIIS_PasswordChangeHistoryTarget Class
MIIS_PasswordChangeQueue Class
MIIS_Server Class

Concepts

Password Synchronization
Password Management
WMI Provider Overview
Using the WMI Provider