Jeff Lynch [MVP]

Sponsors

The Lounge

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
BizTalk Server 2002 - VBScript to Enable Disabled Receive Functions

Here's a very handy script to programmatically re-enable all disabled BizTalk Receive Functions on your BizTalk Server 2002 machine. The code came from an old Microsoft Knowledge Base Article (324524). I've used it for several years without any problems. Copy the code below into Notepad and save the file with a .vbs extension. Double-click on the file to re-enable all your Receive Functions.

Dim oLocator, oServices, oRcvFunction, oRcvFunctionInstance
Set oLocator = CreateObject("WbemScripting.SWbemLocator")  
Set oServices = oLocator.ConnectServer(,"root/MicrosoftBizTalkServer") 
Set oRcvFunction = oServices.Get("MicrosoftBizTalkServer_ReceiveFunction")
 
On Error Resume Next
 
For Each oRcvFunctionInstance in oRcvFunction.Instances_
  With oRcvFunctionInstance     
   .DisableReceiveFunction = False
   .Put_ (1) 'wbemChangeFlagUpdateOnly  
  End With
Next

Set oLocator = Nothing
Set oServices = Nothing
Set oRcvFunction = Nothing
Set oRcvFunctionInstance = Nothing   


Posted 07-01-2004 8:19 PM by Jeff Lynch

[Advertisement]

Add a Comment

(required)  
(optional)
(required)  
Remember Me?