BizTalkHostInstance Class

MSBuild Extension Pack

BizTalkHostInstance Class MSBuild Extension Pack Help 4.0.12.0
Valid TaskActions are:

CheckExists (Required: HostName Optional: MachineName Output: Exists, State)

Create (Required: HostName, AccountName, AccountPassword Optional: MachineName, Force)

Delete (Required: HostName Optional: MachineName)

Get (Optional: MachineName Output: HostInstances)

GetState (Required: HostName Optional: MachineName Output: State)

Start (Required: HostName or HostInstances Optional: MachineName)

Stop (Required: HostName or HostInstances Optional: MachineName)

Remote Execution Support: Yes

Inheritance Hierarchy

SystemObject  Microsoft.Build.UtilitiesTask
    MSBuild.ExtensionPackBaseTask
      MSBuild.ExtensionPack.BizTalkBizTalkHostInstance

Namespace: MSBuild.ExtensionPack.BizTalk
Assembly: MSBuild.ExtensionPack.BizTalk (in MSBuild.ExtensionPack.BizTalk.dll) Version: 4.0.0.0

The BizTalkHostInstance type exposes the following members.

Constructors

  NameDescription
Public methodBizTalkHostInstance
Top
Properties

  NameDescription
Public propertyAccountName
The logon account to use for the Host Instance
Public propertyAccountPassword
The logon password to use for the Host Instance
Public propertyExists
Gets whether the host instance exists
Public propertyForce
Set to true to delete an existing host instance when Create is called.
Public propertyHostInstances
The Host Instances returned by Get. The name of the Host Instance is used as the Identity. Metadata includes: Caption, ConfigurationState, Description, HostType, InstallDate, IsDisabled, MgmtDbNameOverride, MgmtDbServerOverride, NTGroupName, RunningServer, ServiceState, Status, UniqueID. HostInstances may also be used to Stop or Start a group of HostInstances in parallel.
Public propertyHostName
The parent hostname for the host instance
Public propertyState
Gets the state of the host instance
Top
Examples

<Project ToolsVersion="4.0" DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>
        <TPath>$(MSBuildProjectDirectory)\..\MSBuild.ExtensionPack.tasks</TPath>
        <TPath Condition="Exists('$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks')">$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks</TPath>
    </PropertyGroup>
    <Import Project="$(TPath)"/>
    <Target Name="Default">
        <!-- Create a Host Instance -->
        <MSBuild.ExtensionPack.BizTalk.BizTalkHostInstance TaskAction="Create" HostName="MSBEPTESTHOST" AccountName="yourserviceaccount" AccountPassword="yourpassword" Force="True"/>
        <!-- Check a Host Instance exists (it should), and get it's state-->
        <MSBuild.ExtensionPack.BizTalk.BizTalkHostInstance TaskAction="CheckExists" HostName="MSBEPTESTHOST">
            <Output TaskParameter="Exists" PropertyName="DoesExist"/>
            <Output TaskParameter="State" PropertyName="InstanceState"/>
        </MSBuild.ExtensionPack.BizTalk.BizTalkHostInstance>
        <Message Text="BizTalkHostInstance Exists: $(DoesExist) and is $(InstanceState)"/>
        <!-- Start a Host Instance -->
        <MSBuild.ExtensionPack.BizTalk.BizTalkHostInstance TaskAction="Start" HostName="MSBEPTESTHOST"/>
        <!-- Get a Host Instance state-->
        <MSBuild.ExtensionPack.BizTalk.BizTalkHostInstance TaskAction="GetState" HostName="MSBEPTESTHOST">
            <Output TaskParameter="State" PropertyName="InstanceState"/>
        </MSBuild.ExtensionPack.BizTalk.BizTalkHostInstance>
        <Message Text="BizTalkHostInstance state: $(InstanceState)"/>
        <!-- Stop a Host Instance -->
        <MSBuild.ExtensionPack.BizTalk.BizTalkHostInstance TaskAction="Stop" HostName="MSBEPTESTHOST"/>
        <!-- Get a Host Instance state-->
        <MSBuild.ExtensionPack.BizTalk.BizTalkHostInstance TaskAction="GetState" HostName="MSBEPTESTHOST">
            <Output TaskParameter="State" PropertyName="InstanceState"/>
        </MSBuild.ExtensionPack.BizTalk.BizTalkHostInstance>
        <Message Text="BizTalkHostInstance state: $(InstanceState)"/>
        <!-- Delete a Host Instance -->
        <MSBuild.ExtensionPack.BizTalk.BizTalkHostInstance TaskAction="Delete" HostName="MSBEPTESTHOST"/>
        <!-- Check a Host Instance exists again (it shouldn't)-->
        <MSBuild.ExtensionPack.BizTalk.BizTalkHostInstance TaskAction="CheckExists" HostName="MSBEPTESTHOST">
            <Output TaskParameter="Exists" PropertyName="DoesExist"/>
        </MSBuild.ExtensionPack.BizTalk.BizTalkHostInstance>
        <Message Text="BizTalkHostInstance Exists: $(DoesExist)"/>
        <!-- Get a list of Host Instances -->
        <MSBuild.ExtensionPack.BizTalk.BizTalkHostInstance TaskAction="Get">
            <Output TaskParameter="HostInstances" ItemName="His"/>
        </MSBuild.ExtensionPack.BizTalk.BizTalkHostInstance>
        <Message Text="HI: %(His.Identity) - ServiceState: %(His.ServiceState)"/>
        <Message Text="HI: %(His.Identity) - HostType: %(His.HostType)"/>
        <Message Text="HI: %(His.Identity) - IsDisabled: %(His.IsDisabled)"/>
        <Message Text="HI: %(His.Identity) - Caption: %(His.Caption)"/>
        <Message Text="HI: %(His.Identity) - ConfigurationState: %(His.ConfigurationState)"/>
        <Message Text="HI: %(His.Identity) - Description: %(His.Description)"/>
        <Message Text="HI: %(His.Identity) - InstallDate: %(His.InstallDate)"/>
        <Message Text="HI: %(His.Identity) - MgmtDbNameOverride: %(His.MgmtDbNameOverride)"/>
        <Message Text="HI: %(His.Identity) - MgmtDbServerOverride: %(His.MgmtDbServerOverride)"/>
        <Message Text="HI: %(His.Identity) - RunningServer: %(His.RunningServer)"/>
        <Message Text="HI: %(His.Identity) - Status: %(His.Status)"/>
        <Message Text="HI: %(His.Identity) - UniqueID: %(His.UniqueID)"/>
        <Message Text="HI: %(His.Identity) - NTGroupName: %(His.NTGroupName)"/>
    </Target>
</Project>
See Also

Reference