Microsoft Identity Integration Server 2003 Developer Reference

RunDetails Method of the MIIS_ManagementAgent Class

The RunDetails method returns the details of the last management agent run in an XML format. For more information about the run details XML schema, see <run-history>. To use this method, you must be logged on as a member of the MIISBrowse, MIISOperators, or MIISAdmins security group.
string RunDetails();


This method has no parameters.

Return Values

Returns either a string in XML format that contains the details of the last management agent run or one of the values listed in Return Strings. If you run this method after creating a new management agent, an empty <run-history> element is returned


Use this method to find the details of a management agent run prior to archiving the run.

Example Code

The following example shows you how to use Visual Basic Scripting Edition (VBScript) to get the details of the last management agent run:

Option Explicit

On Error Resume Next

Dim Service		 
Dim ManagementAgent
Dim Status

Set Service = GetObject("winmgmts:root\MicrosoftIdentityIntegrationServer")
Set ManagementAgent = Service.Get("MIIS_ManagementAgent.Name='Fabrikam HR MA'")
WScript.Echo "Run Status: " & ManagementAgent.Execute("Full Import")

' Shows the details of the current management agent run.
WScript.Echo "Run Details"
WScript.Echo ManagementAgent.RunDetails()

Sub ErrorHandler (ErrorMessage)
  WScript.Echo ErrorMessage
End Sub


Server: Requires Microsoft Identity Integration Server 2003.
Header: Declared in mmswmi.mof.

See Also

<run-history>, MIIS_ManagementAgent