How To Use Windows Management Instrumentation to Re-Enable BizTalk Server Receive Functions (324524)



The information in this article applies to:

  • Microsoft BizTalk Server 2000
  • Microsoft BizTalk Server 2002

This article was previously published under Q324524

IN THIS TASK

SUMMARY

This article describes how to programmatically re-enable all disabled BizTalk Receive functions on your BizTalk Server computer.

back to the top

Sample Code

The following sample code illustrates how to programmatically re-enable all disabled BizTalk Receive functions on your BizTalk Server computer.

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please visit the following Microsoft Web site: For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:
  1. Paste the following code into Notepad:
    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    
    					
  2. Use a .vbs (Visual Basic Script) extension when you save the file.
  3. Double-click the saved file to re-enable all Receive functions on your BizTalk Server computer.
back to the top

Modification Type:MajorLast Reviewed:6/23/2005
Keywords:kbhowto KB324524