How to: Display the Results of a Management Agent Profile Run
After you run a management agent profile in Forefront Identity Manager Synchronization Service (FIM Synchronization Service), you can verify that your proposed changes to the metaverse occurred. You can check the result through the properties of the MIIS_ManagementAgent Class class.
The following Microsoft Visual Basic Scripting Edition (VBScript) example shows how to use the properties of the MIIS_ManagementAgent Class class to display the results of a management agent profile run.
Option Explicit
On Error Resume Next
Const PktPrivacy = 6
Dim Service
Dim ManagementAgent
Dim Status
Set Service = GetObject("winmgmts:{authenticationLevel=PktPrivacy}!root\MicrosoftIdentityIntegrationServer")
Set ManagementAgent = Service.Get("MIIS_ManagementAgent.Name='Fabrikam HR MA'")
Status = ManagementAgent.Execute("Full Import")
If Status = "success" then
WScript.Echo "Run Statistics"
WScript.Echo " Run Profile: " & ManagementAgent.RunProfile()
WScript.Echo " Start Time : " & ManagementAgent.RunStartTime()
WScript.Echo " End Time : " & ManagementAgent.RunEndTime() & vbcrlf
WScript.Echo "--------------------------------------------------------------"
WScript.Echo "Object Details"
WScript.Echo " Total connector space objects: " _
& ManagementAgent.NumCSObjects() & vbcrlf
WScript.Echo " Total Connectors: " _
& ManagementAgent.NumTotalConnectors()
WScript.Echo " Connectors: " _
& ManagementAgent.NumConnectors()
WScript.Echo " Explicit Connectors: " _
& ManagementAgent.NumExplicitConnectors() & vbcrlf
WScript.Echo " Total Disconnectors: " _
& ManagementAgent.NumTotalDisconnectors()
WScript.Echo " Disconnectors: " & ManagementAgent.NumDisconnectors()
WScript.Echo " Explicit Disconnectors: " _
& ManagementAgent.NumExplicitDisconnectors()
WScript.Echo " Filtered Disconnectors: " _
& ManagementAgent.NumFilteredDisconnectors() & vbcrlf
WScript.Echo " Total Placeholders: " _
& ManagementAgent.NumPlaceholders() & vbcrlf
WScript.Echo "-------------------------------------------------------------"
WScript.Echo "Other Details"
WScript.Echo " Import Add: " & ManagementAgent.NumImportAdd()
WScript.Echo " Import Updates: " & ManagementAgent.NumImportUpdate()
WScript.Echo " Import Deletes: " & ManagementAgent.NumImportDelete()
WScript.Echo " Import No Change: " & ManagementAgent.NumImportNoChange()
WScript.Echo vbcrlf
WScript.Echo " Export Add: " & ManagementAgent.NumExportAdd()
WScript.Echo " Export Deletes: " & ManagementAgent.NumExportDelete()
WScript.Echo " Export Updates: " & ManagementAgent.NumExportUpdate()
Else
WScript.Echo "An error occurred. " & Status
End If
Sub ErrorHandler (ErrorMessage)
WScript.Echo ErrorMessage
WScript.Quit(1)
End Sub
See Also
Reference
Concepts
Script Examples
Creating Scripts
How to: Enable Security in Scripts