description | title | ms.custom | ms.date | ms.service | ms.reviewer | ms.suite | ms.topic |
---|---|---|---|---|---|---|---|
Learn more about: Remove Receive Port (BizTalk Server Sample) |
Remove Receive Port (BizTalk Server Sample) |
06/08/2017 |
biztalk-server |
article |
The Remove Receive Port sample demonstrates how to remove one or more receive ports.
Warning
Deployment scripts should be removed after deployment if not needed. Administration scripts and other scripts that must remain should be secured by ACL’s and closely monitored.
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.
The samples are located in the following SDK location:
<Samples Path>\Admin\WMI\Remove Receive Port\
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. |
The Remove Receive Port sample consists of a single VBScript file that you do not need to build or initialize.
-
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"
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.