Partager via


RunDetails Method

Returns the details of the last management agent run in 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.

mof
string RunDetails();

Parameters

None

Name : RunDetails

Return Value

string

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

Remarks

Use this method to find the details of a management agent run before you archive the run.

Example

The following example shows how to use Microsoft 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
  WScript.Quit(1)
End Sub

Requirements

Product

Forefront Identity Manager Synchronization Service 2010

MOF

Mmswmi.mof

See Also

Reference

MIIS_ManagementAgent Class
WMI Provider Return Strings
<run-history>

Concepts

WMI Provider Reference
Methods