Stop Orchestration (BizTalk Server Sample)

The Stop Orchestration sample demonstrates how to stop a BizTalk Server orchestration and, optionally, to unenlist it.

The Visual Basic Scripting Edition (VBScript) script in the script file that constitutes this sample shows how to perform the following operations using the BizTalk Server WMI provider:

  • Given an orchestration name and an assembly name, query for a specific deployed BizTalk Server orchestration.
  • Stop that orchestration.
  • Unenlist that orchestration (optionally).
  • Handle any errors such that meaningful information is returned to the user.

Note  For important information about all samples in this SDK, see Samples.

To download the updated BizTalk Server 2004 SDK, go to

Important  There is a potentially exploitable SQL Injection security vulnerability in StopOrch.vbs. We recommend that StopOrch.vbs be removed from a production environment or secured in a share with administrative access control lists (ACLs).

Location in SDK

<Samples Path>\Admin\WMI\Stop Orchestration\

File Inventory

The following table shows the files in this sample and describes their purpose.

In the \VBScript folder:


VBScript file that takes parameters to specify an orchestration to be stopped and, optionally, unenlisted.

To Build and Initialize This Sample

The Stop Orchestration sample consists of a single VBScript file that you do not need to build or initialize.

To Run This Sample

Use the following procedure to run the Stop Orchestration sample.

  1. In a command window, navigate to the following folder:

    <Samples Path>\Admin\WMI\Stop Orchestration\VBScript\

  2. Run the file StopOrch.vbs using the cscript program, passing the following command-line arguments, of which the third one is optional:
    • <OrchestrationName>. The name of the BizTalk Server orchestration to be stopped and, optionally, unenlisted.
    • <AssemblyName>. The name of the BizTalk assembly in which the specified orchestration was deployed. If the assembly name contains spaces, enclose the name in quotes.
    • Unenlist. An optional, literal string used to indicate that the specified orchestration should be unenlisted in addition to being stopped.

      For example:

      cscript StopOrch.vbs MyBusinessOrchestration "My Business Assembly"


    cscript StopOrch.vbs MyBusinessOrchestration MyBusinessAssembly Unenlist


All tasks that you can perform in the BizTalk Server Administration console can also be performed by using scripts that access the Windows WMI object model.

The script file StopOrch.vbs contains detailed comments with further explanation about the operations that it performs. For more information, see Windows Management Instrumentation at

See Also

Admin\WMI (BizTalk Server Samples Folder)

To download updated BizTalk Server 2004 Help from, go to

Copyright © 2004 Microsoft Corporation.
All rights reserved.