<Activity mc:Ignorable="sads sap" x:Class="Microsoft.PowerShell.DynamicActivities._a4e6440691404c45a7ee848ff680549e"
 xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:mpa="clr-namespace:Microsoft.PowerShell.Activities;assembly=Microsoft.PowerShell.Activities"
 xmlns:mpua="clr-namespace:Microsoft.PowerShell.Utility.Activities;assembly=Microsoft.PowerShell.Utility.Activities"
 xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities"
 xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities"
 xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
 xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
 xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
 xmlns:sma="clr-namespace:System.Management.Automation;assembly=System.Management.Automation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <x:Members>
    <x:Property Name="DatabaseConnectionString" Type="InArgument(x:String)">
      <x:Property.Attributes>
        <RequiredArgumentAttribute />
      </x:Property.Attributes>
    </x:Property>
    <x:Property Name="DatabaseFilePath" Type="InArgument(x:String)">
      <x:Property.Attributes>
        <RequiredArgumentAttribute />
      </x:Property.Attributes>
    </x:Property>
    <x:Property Name="DnsRRName" Type="InArgument(x:String)">
      <x:Property.Attributes>
        <RequiredArgumentAttribute />
      </x:Property.Attributes>
    </x:Property>
    <x:Property Name="Result" Type="OutArgument(sma:PSObject)" />
    <x:Property Name="RDMSServer" Type="InArgument(x:String)">
      <x:Property.Attributes>
        <RequiredArgumentAttribute />
      </x:Property.Attributes>
    </x:Property>
  </x:Members>
  <sap:VirtualizedContainerService.HintSize>1016,1418</sap:VirtualizedContainerService.HintSize>
  <mva:VisualBasic.Settings>Assembly references and imported namespaces for internal implementation</mva:VisualBasic.Settings>
  <Sequence sap:VirtualizedContainerService.HintSize="976,1378">
    <sap:WorkflowViewStateService.ViewState>
      <scg:Dictionary x:TypeArguments="x:String, x:Object">
        <x:Boolean x:Key="IsExpanded">True</x:Boolean>
      </scg:Dictionary>
    </sap:WorkflowViewStateService.ViewState>
    <Assign sap:VirtualizedContainerService.HintSize="954,60">
      <Assign.To>
        <OutArgument x:TypeArguments="sma:PSObject">[Result]</OutArgument>
      </Assign.To>
      <Assign.Value>
        <InArgument x:TypeArguments="sma:PSObject">[New PSObject]</InArgument>
      </Assign.Value>
    </Assign>
    <Sequence DisplayName="Configure RD Management server for HA" sap:VirtualizedContainerService.HintSize="954,1154">
      <Sequence.Variables>
        <Variable x:TypeArguments="sma:PSDataCollection(sma:ErrorRecord)" Name="Errors" />
        <Variable x:TypeArguments="sma:PSObject" Name="Output" />
      </Sequence.Variables>
      <sap:WorkflowViewStateService.ViewState>
        <scg:Dictionary x:TypeArguments="x:String, x:Object">
          <x:Boolean x:Key="IsExpanded">True</x:Boolean>
        </scg:Dictionary>
      </sap:WorkflowViewStateService.ViewState>
      <Assign sap:VirtualizedContainerService.HintSize="932,60">
        <Assign.To>
          <OutArgument x:TypeArguments="sma:PSDataCollection(sma:ErrorRecord)">[Errors]</OutArgument>
        </Assign.To>
        <Assign.Value>
          <InArgument x:TypeArguments="sma:PSDataCollection(sma:ErrorRecord)">[New PSDataCollection(Of ErrorRecord)]</InArgument>
        </Assign.Value>
      </Assign>
      <mpa:InlineScript PSRemotingBehavior="{x:Null}" Command="import-module $env:windir\System32\ServerManagerInternal\rdmanagement;&#xD;&#xA;Set-RDMSHA -ManagementServer $using:RDMSServer -DatabaseConnectionString $using:DatabaseConnectionString -DatabaseFilePath $using:DatabaseFilePath -DnsRRName $using:DnsRRName " DisplayName="Invoke Cmdlet" sap:VirtualizedContainerService.HintSize="932,102" PSError="[Errors]">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </mpa:InlineScript>
      <If Condition="[Errors.Count &gt; 0]" sap:VirtualizedContainerService.HintSize="932,788">
        <If.Then>
          <Sequence sap:VirtualizedContainerService.HintSize="309,680">
            <sap:WorkflowViewStateService.ViewState>
              <scg:Dictionary x:TypeArguments="x:String, x:Object">
                <x:Boolean x:Key="IsExpanded">True</x:Boolean>
              </scg:Dictionary>
            </sap:WorkflowViewStateService.ViewState>
            <InvokeMethod sap:VirtualizedContainerService.HintSize="287,134" MethodName="Add">
              <InvokeMethod.TargetObject>
                <InArgument x:TypeArguments="sma:PSMemberInfoCollection(sma:PSPropertyInfo)">[Result.Properties]</InArgument>
              </InvokeMethod.TargetObject>
              <InArgument x:TypeArguments="sma:PSNoteProperty">[New PSNoteProperty("Success", False)]</InArgument>
            </InvokeMethod>
            <InvokeMethod sap:VirtualizedContainerService.HintSize="287,134" MethodName="Add">
              <InvokeMethod.TargetObject>
                <InArgument x:TypeArguments="sma:PSMemberInfoCollection(sma:PSPropertyInfo)">[Result.Properties]</InArgument>
              </InvokeMethod.TargetObject>
              <InArgument x:TypeArguments="sma:PSNoteProperty">[New PSNoteProperty("ErrorRecord", Errors)]</InArgument>
            </InvokeMethod>
            <ForEach x:TypeArguments="sma:ErrorRecord" DisplayName="ForEach&lt;ErrorRecord&gt;" sap:VirtualizedContainerService.HintSize="287,208" Values="[Errors]">
              <ActivityAction x:TypeArguments="sma:ErrorRecord">
                <ActivityAction.Argument>
                  <DelegateInArgument x:TypeArguments="sma:ErrorRecord" Name="errorRecord" />
                </ActivityAction.Argument>
                <mpua:WriteError DisplayName="Write-Error" ErrorRecord="[errorRecord]" sap:VirtualizedContainerService.HintSize="200,22" />
              </ActivityAction>
            </ForEach>
          </Sequence>
        </If.Then>
        <If.Else>
          <InvokeMethod sap:VirtualizedContainerService.HintSize="218,134" MethodName="Add">
            <InvokeMethod.TargetObject>
              <InArgument x:TypeArguments="sma:PSMemberInfoCollection(sma:PSPropertyInfo)">[Result.Properties]</InArgument>
            </InvokeMethod.TargetObject>
            <InArgument x:TypeArguments="sma:PSNoteProperty">[New PSNoteProperty("Success", True)]</InArgument>
          </InvokeMethod>
        </If.Else>
      </If>
    </Sequence>
  </Sequence>
</Activity>
