Microsoft Identity Integration Server 2003 Developer Reference

Stop Method of the MIIS_ManagementAgent Class

The Stop method stops the management agent specified in the Get method. This call is synchronous and blocks any other calls to the specified management agent until this method is completed. To use this method, you must be logged on as a member of the MIISOperators security group or the MIISAdmins security group.
String Stop();


This method has no parameters.

Return Values

The return value can be one of the following values or one of the values listed in Return Strings.
Return code Description
access-denied The caller is not a member of the MIISAdmins or MIISOperators group on the server. Only members of those groups can run management agents.
ma-not-running The management agent is idle. You cannot call the Stop method to stop a management agent that is idle.
success The method stopped the management agent.


This method only stops the specified management agent. Other running management agents are not affected by a call to this method. The time to stop a management agent depends upon the number of affected objects in the synchronization run.

Example Code

The following example shows how you can use the Visual Basic Scripting Edition (VBScript) to stop a specified management agent. This example stops the full import run profile of the Fabrikam HR MA management agent.

Option Explicit
Dim Service
Dim ManagementAgent

Set Service = GetObject("winmgmts:\root\MicrosoftIdentityIntegrationServer")
Set ManagementAgent = Service.Get("MIIS_ManagementAgent.Name='" & "Fabrikam HR MA" & "'")
WScript.Echo "Stop returned '" & ManagementAgent.Stop() & "'"


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

See Also