Remove Receive Port (BizTalk Server Sample)
The Remove Receive Port sample demonstrates how to remove one or more receive ports.
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 a receive port name, query for a list of matching receive ports.
Note Generally, there will only be one receive port that matches a given name.
- Remove those receive ports.
- 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 http://go.microsoft.com/fwlink/?LinkId=24723.
Important There is a potentially exploitable SQL Injection security vulnerability in RemoveReceivePort.vbs. We recommend that RemoveReceivePort.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\Remove Receive Port\
File Inventory
The following table shows the files in this sample and describes their purpose.
| File(s) | Description |
|---|---|
| In the \VBScript folder:
RemoveReceivePort.vbs | VBScript file that takes a parameter that specifies one or more receive ports to remove. |
To Build and Initialize This Sample
The Remove Receive Port 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 Remove Receive Port sample.
- In a command window, navigate to the following folder:
<Samples Path>\Admin\WMI\Remove Receive Port\VBScript\
- Run the file RemoveReceivePort.vbs using the cscript program, passing the following command-line argument:
- <ReceivePortName>. The name of the receive port(s) to remove. If the receive port name contains spaces, enclose the name in quotes.
For example:
cscript RemoveReceivePort.vbs "My Business Receive Port"
- <ReceivePortName>. The name of the receive port(s) to remove. If the receive port name contains spaces, enclose the name in quotes.
Remarks
All tasks that you can perform in the BizTalk Server Administration console can also be performed by using script that accesses the Windows WMI object model.
The script file RemoveReceivePort.vbs contains detailed comments with further explanation about the operations that it performs. For more information, see Windows Management Instrumentation at http://go.microsoft.com/fwlink/?LinkId=21102.
See Also
Admin\WMI (BizTalk Server Samples Folder)
To download updated BizTalk Server 2004 Help from www.microsoft.com, go to http://go.microsoft.com/fwlink/?linkid=20616.Copyright © 2004 Microsoft Corporation.All rights reserved.