<Activity mc:Ignorable="sads sap" x:Class="Microsoft.RemoteDesktopServices.Workflow.SetUserDataVhdSetting" this:SetUserDataVhdSetting.UserVhdShare="[Nothing]" this:SetUserDataVhdSetting.RemapMode="-1" this:SetUserDataVhdSetting.IncludeFileLocation="[Nothing]" this:SetUserDataVhdSetting.ExcludeFileLocation="[Nothing]" this:SetUserDataVhdSetting.IncludeFolderLocation="[Nothing]" this:SetUserDataVhdSetting.ExcludeFolderLocation="[Nothing]"
 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:mpda="clr-namespace:Microsoft.PowerShell.Diagnostics.Activities;assembly=Microsoft.PowerShell.Diagnostics.Activities"
 xmlns:mpma="clr-namespace:Microsoft.PowerShell.Management.Activities;assembly=Microsoft.PowerShell.Management.Activities"
 xmlns:mpua="clr-namespace:Microsoft.PowerShell.Utility.Activities;assembly=Microsoft.PowerShell.Utility.Activities"
 xmlns:mrma="clr-namespace:Microsoft.RemoteDesktopServices.Management.Activities;assembly=Microsoft.RemoteDesktopServices.Management.Activities"
 xmlns:mv="clr-namespace:Microsoft.VisualBasic;assembly=System"
 xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities"
 xmlns:s="clr-namespace:System;assembly=mscorlib"
 xmlns:s1="clr-namespace:System;assembly=System.Core"
 xmlns:s2="clr-namespace:System;assembly=System"
 xmlns:s3="clr-namespace:System;assembly=System.ServiceModel"
 xmlns:s4="clr-namespace:System;assembly=System.ComponentModel.Composition"
 xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities"
 xmlns:sad="clr-namespace:System.Activities.Debugger;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:sc="clr-namespace:System.Collections;assembly=mscorlib"
 xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
 xmlns:sd="clr-namespace:System.Diagnostics;assembly=WindowsBase"
 xmlns:sd1="clr-namespace:System.Diagnostics;assembly=mscorlib"
 xmlns:sd2="clr-namespace:System.Diagnostics;assembly=System"
 xmlns:sd3="clr-namespace:System.Diagnostics;assembly=System.Core"
 xmlns:sd4="clr-namespace:System.Diagnostics;assembly=System.Configuration.Install"
 xmlns:sg="clr-namespace:System.Globalization;assembly=mscorlib"
 xmlns:sm="clr-namespace:System.Management;assembly=System.Management"
 xmlns:sma="clr-namespace:System.Management.Automation;assembly=System.Management.Automation"
 xmlns:st="clr-namespace:System.Threading;assembly=mscorlib"
 xmlns:this="clr-namespace:Microsoft.RemoteDesktopServices.Workflow"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <x:Members>
    <x:Property Name="CollectionAlias" Type="InArgument(x:String)">
      <x:Property.Attributes>
        <RequiredArgumentAttribute />
      </x:Property.Attributes>
    </x:Property>
    <x:Property Name="UserVhdShare" Type="InArgument(x:String)" />
    <x:Property Name="RemapMode" Type="InArgument(x:Int32)" />
    <x:Property Name="RDMSServer" Type="InArgument(x:String)">
      <x:Property.Attributes>
        <RequiredArgumentAttribute />
      </x:Property.Attributes>
    </x:Property>
    <x:Property Name="IncludeFileLocation" Type="InArgument(s:String[])" />
    <x:Property Name="ExcludeFileLocation" Type="InArgument(s:String[])" />
    <x:Property Name="IncludeFolderLocation" Type="InArgument(s:String[])" />
    <x:Property Name="ExcludeFolderLocation" Type="InArgument(s:String[])" />
  </x:Members>
  <sap:VirtualizedContainerService.HintSize>886,2697</sap:VirtualizedContainerService.HintSize>
  <mva:VisualBasic.Settings>Assembly references and imported namespaces for internal implementation</mva:VisualBasic.Settings>
  <sap:WorkflowViewStateService.ViewState>
    <scg:Dictionary x:TypeArguments="x:String, x:Object">
      <x:Boolean x:Key="ShouldExpandAll">True</x:Boolean>
      <x:Boolean x:Key="ShouldCollapseAll">False</x:Boolean>
    </scg:Dictionary>
  </sap:WorkflowViewStateService.ViewState>
  <Sequence DisplayName="SetUserDataVhdSetting" sap:VirtualizedContainerService.HintSize="846,2657">
    <Sequence.Variables>
      <Variable x:TypeArguments="sma:PSDataCollection(sma:PSObject)" Name="vmPool" />
      <Variable x:TypeArguments="x:String" Name="vmFarmSetting" />
      <Variable x:TypeArguments="x:String" Name="userVhdSetting" />
      <Variable x:TypeArguments="mrma:UserDataVhdSetting" Name="userDataVhdSetting" />
      <Variable x:TypeArguments="sc:Hashtable" Default="[New Hashtable()]" Name="vmFarmProperties" />
      <Variable x:TypeArguments="sma:PSDataCollection(sma:PSObject)" Default="[New PSDataCollection(Of PSObject)]" Name="null" />
      <Variable x:TypeArguments="sma:PSDataCollection(sma:PSObject)" Name="cmdResult" />
      <Variable x:TypeArguments="x:String" Default="[Nothing]" Name="tempUserVHDShare" />
      <Variable x:TypeArguments="x:Int64" Default="1073741824" Name="BytesInGB" />
      <Variable x:TypeArguments="sma:PSDataCollection(sma:ErrorRecord)" Name="TemplateCreationError" />
    </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>
    <mpua:WriteVerbose DisplayName="Verbose: Input" sap:VirtualizedContainerService.HintSize="824,22" Message="[&quot;Alias: &quot; &amp; CollectionAlias]" />
    <mpda:NewWinEvent DisplayName="New-WinEvent" sap:VirtualizedContainerService.HintSize="824,22" Payload="[{new PSObject(CollectionAlias)}]" ProviderName="Microsoft-Windows-Rdms-UI" WinEventId="8236" />
    <Sequence DisplayName="Validate" sap:VirtualizedContainerService.HintSize="824,992">
      <Sequence.Variables>
        <Variable x:TypeArguments="x:Boolean" Default="False" Name="includeLocationSpecified" />
        <Variable x:TypeArguments="x:Boolean" Default="False" Name="remapModeNonZero" />
      </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>
      <mpa:GetWmiObject Amended="False" Class="Win32_RDMSVirtualDesktopCollection" DirectRead="False" DisplayName="GWMI: Pool" EnableAllPrivileges="False" Filter="[&quot;Alias = '&quot; &amp; CollectionAlias &amp; &quot;'&quot;]" sap:VirtualizedContainerService.HintSize="242,22" Impersonation="Impersonate" Namespace="ROOT\cimv2\rdms" PSAuthenticationLevel="PacketPrivacy" PSComputerName="[{RDMSServer}]" Result="[vmPool]" />
      <If Condition="[vmPool.Count &lt;&gt; 1]" DisplayName="CheckIfPoolExists" sap:VirtualizedContainerService.HintSize="242,51">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            <x:Boolean x:Key="IsPinned">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
        <If.Then>
          <Sequence sap:VirtualizedContainerService.HintSize="222,208">
            <sap:WorkflowViewStateService.ViewState>
              <scg:Dictionary x:TypeArguments="x:String, x:Object">
                <x:Boolean x:Key="IsExpanded">True</x:Boolean>
              </scg:Dictionary>
            </sap:WorkflowViewStateService.ViewState>
            <mpda:NewWinEvent DisplayName="New-WinEvent" sap:VirtualizedContainerService.HintSize="200,22" Payload="[{new PSObject(CollectionAlias), new PSObject(String.Format(System.Globalization.CultureInfo.CurrentCulture, RDManagementResources.SpecifiedCollectionDoesNotExist, CollectionAlias))}]" ProviderName="Microsoft-Windows-Rdms-UI" WinEventId="8237" />
            <TerminateWorkflow sap:VirtualizedContainerService.HintSize="200,22" Reason="[String.Format(System.Globalization.CultureInfo.CurrentCulture, RDManagementResources.SpecifiedCollectionDoesNotExist, CollectionAlias)]" />
          </Sequence>
        </If.Then>
      </If>
      <Assign sap:VirtualizedContainerService.HintSize="242,60">
        <Assign.To>
          <OutArgument x:TypeArguments="x:String">[vmFarmSetting]</OutArgument>
        </Assign.To>
        <Assign.Value>
          <InArgument x:TypeArguments="x:String">[CType(vmPool(0).Properties("VmFarmSettings").Value, String)]</InArgument>
        </Assign.Value>
      </Assign>
      <Assign sap:VirtualizedContainerService.HintSize="242,60">
        <Assign.To>
          <OutArgument x:TypeArguments="x:String">[userVhdSetting]</OutArgument>
        </Assign.To>
        <Assign.Value>
          <InArgument x:TypeArguments="x:String">[CType(vmPool(0).Properties("UserVHDSetting").Value, String)]</InArgument>
        </Assign.Value>
      </Assign>
      <Assign sap:VirtualizedContainerService.HintSize="242,60">
        <Assign.To>
          <OutArgument x:TypeArguments="mrma:UserDataVhdSetting">[userDataVhdSetting]</OutArgument>
        </Assign.To>
        <Assign.Value>
          <InArgument x:TypeArguments="mrma:UserDataVhdSetting">[UserDataVhdUtility.GetUserDataVhdSetting(vmFarmSetting,userVhdSetting)]</InArgument>
        </Assign.Value>
      </Assign>
      <If Condition="[Not userDataVhdSetting.UserVhdEnabled]" DisplayName="CheckIfUvhdIsEnabled" sap:VirtualizedContainerService.HintSize="242,51">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            <x:Boolean x:Key="IsPinned">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
        <If.Then>
          <Sequence sap:VirtualizedContainerService.HintSize="222,208">
            <sap:WorkflowViewStateService.ViewState>
              <scg:Dictionary x:TypeArguments="x:String, x:Object">
                <x:Boolean x:Key="IsExpanded">True</x:Boolean>
              </scg:Dictionary>
            </sap:WorkflowViewStateService.ViewState>
            <mpda:NewWinEvent DisplayName="New-WinEvent" sap:VirtualizedContainerService.HintSize="200,22" Payload="[{new PSObject(CollectionAlias), new PSObject(String.Format(System.Globalization.CultureInfo.CurrentCulture, RDManagementResources.UserDataVhdIsNotEnabled, CollectionAlias))}]" ProviderName="Microsoft-Windows-Rdms-UI" WinEventId="8237" />
            <TerminateWorkflow sap:VirtualizedContainerService.HintSize="200,22" Reason="[String.Format(System.Globalization.CultureInfo.CurrentCulture, RDManagementResources.UserDataVhdIsNotEnabled, CollectionAlias)]" />
          </Sequence>
        </If.Then>
      </If>
      <If Condition="[(IncludeFileLocation Is Nothing) And (IncludeFolderLocation Is Nothing)]" DisplayName="IncludeLocationSpecified" sap:VirtualizedContainerService.HintSize="242,51">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            <x:Boolean x:Key="IsPinned">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
        <If.Then>
          <Assign sap:VirtualizedContainerService.HintSize="242,60">
            <Assign.To>
              <OutArgument x:TypeArguments="x:Boolean">[includeLocationSpecified]</OutArgument>
            </Assign.To>
            <Assign.Value>
              <InArgument x:TypeArguments="x:Boolean">[(userDataVhdSetting.IncludeFileLocation.Count + userDataVhdSetting.IncludeFolderLocation.Count) &gt; 0]</InArgument>
            </Assign.Value>
          </Assign>
        </If.Then>
        <If.Else>
          <Assign sap:VirtualizedContainerService.HintSize="242,60">
            <Assign.To>
              <OutArgument x:TypeArguments="x:Boolean">[includeLocationSpecified]</OutArgument>
            </Assign.To>
            <Assign.Value>
              <InArgument x:TypeArguments="x:Boolean">[(IncludeFileLocation.Length + IncludeFolderLocation.Length) &gt; 0]</InArgument>
            </Assign.Value>
          </Assign>
        </If.Else>
      </If>
      <If Condition="[RemapMode = -1]" DisplayName="NonZeroRemapMode" sap:VirtualizedContainerService.HintSize="242,51">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            <x:Boolean x:Key="IsPinned">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
        <If.Then>
          <Assign sap:VirtualizedContainerService.HintSize="242,60">
            <Assign.To>
              <OutArgument x:TypeArguments="x:Boolean">[remapModeNonZero]</OutArgument>
            </Assign.To>
            <Assign.Value>
              <InArgument x:TypeArguments="x:Boolean">[userDataVhdSetting.RemapMode &lt;&gt; 0]</InArgument>
            </Assign.Value>
          </Assign>
        </If.Then>
        <If.Else>
          <Assign sap:VirtualizedContainerService.HintSize="242,60">
            <Assign.To>
              <OutArgument x:TypeArguments="x:Boolean">[remapModeNonZero]</OutArgument>
            </Assign.To>
            <Assign.Value>
              <InArgument x:TypeArguments="x:Boolean">[RemapMode &lt;&gt; 0]</InArgument>
            </Assign.Value>
          </Assign>
        </If.Else>
      </If>
      <If Condition="[remapModeNonZero And (Not includeLocationSpecified)]" DisplayName="CheckIfIncludeFolderIsSpecified" sap:VirtualizedContainerService.HintSize="242,51">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            <x:Boolean x:Key="IsPinned">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
        <If.Then>
          <Sequence sap:VirtualizedContainerService.HintSize="222,208">
            <sap:WorkflowViewStateService.ViewState>
              <scg:Dictionary x:TypeArguments="x:String, x:Object">
                <x:Boolean x:Key="IsExpanded">True</x:Boolean>
              </scg:Dictionary>
            </sap:WorkflowViewStateService.ViewState>
            <mpda:NewWinEvent DisplayName="New-WinEvent" sap:VirtualizedContainerService.HintSize="200,22" Payload="[{new PSObject(CollectionAlias), new PSObject(RDManagementResources.IncludeLocationNotSpecified)}]" ProviderName="Microsoft-Windows-Rdms-UI" WinEventId="8237" />
            <TerminateWorkflow sap:VirtualizedContainerService.HintSize="200,22" Reason="[RDManagementResources.IncludeLocationNotSpecified]" />
          </Sequence>
        </If.Then>
      </If>
      <If Condition="[Not (UserVhdShare Is Nothing)]" DisplayName="UserVhdShare" sap:VirtualizedContainerService.HintSize="242,51">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            <x:Boolean x:Key="IsPinned">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
        <If.Then>
          <Sequence DisplayName="UVHDShare" sap:VirtualizedContainerService.HintSize="538,1452">
            <Sequence.Variables>
              <Variable x:TypeArguments="sma:PSDataCollection(sma:PSObject)" Name="vmPoolList" />
              <Variable x:TypeArguments="sma:PSDataCollection(sma:PSObject)" Name="shareAccessible" />
            </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>
            <mpa:GetWmiObject Amended="False" Class="Win32_RDMSVirtualDesktopCollection" DirectRead="False" DisplayName="GWMI: Pool" EnableAllPrivileges="False" sap:VirtualizedContainerService.HintSize="516,22" Impersonation="Impersonate" Namespace="ROOT\cimv2\rdms" PSAuthenticationLevel="PacketPrivacy" PSComputerName="[{RDMSServer}]" Result="[vmPoolList]" />
            <ForEach x:TypeArguments="sma:PSObject" DisplayName="ForEach&lt;PSObject&gt;" sap:VirtualizedContainerService.HintSize="516,748" Values="[vmPoolList]">
              <ActivityAction x:TypeArguments="sma:PSObject">
                <ActivityAction.Argument>
                  <DelegateInArgument x:TypeArguments="sma:PSObject" Name="pool" />
                </ActivityAction.Argument>
                <Sequence DisplayName="UVHDShareCheck" sap:VirtualizedContainerService.HintSize="486,640">
                  <Sequence.Variables>
                    <Variable x:TypeArguments="x:String" Name="tempFarmSetting" />
                    <Variable x:TypeArguments="mrma:UserDataVhdSetting" Name="tempUvhdSetting" />
                  </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="464,60">
                    <Assign.To>
                      <OutArgument x:TypeArguments="x:String">[tempFarmSetting]</OutArgument>
                    </Assign.To>
                    <Assign.Value>
                      <InArgument x:TypeArguments="x:String">[CType(pool.Properties("VmFarmSettings").Value, String)]</InArgument>
                    </Assign.Value>
                  </Assign>
                  <Assign sap:VirtualizedContainerService.HintSize="464,60">
                    <Assign.To>
                      <OutArgument x:TypeArguments="mrma:UserDataVhdSetting">[tempUvhdSetting]</OutArgument>
                    </Assign.To>
                    <Assign.Value>
                      <InArgument x:TypeArguments="mrma:UserDataVhdSetting">[UserDataVhdUtility.GetUserDataVhdSetting(tempFarmSetting, Nothing)]</InArgument>
                    </Assign.Value>
                  </Assign>
                  <If Condition="[String.Compare(tempUvhdSetting.UserVhdShare, UserVhdShare, True, System.Globalization.CultureInfo.InvariantCulture) = 0]" DisplayName="Check if uservhd share is already configured for another pool" sap:VirtualizedContainerService.HintSize="464,316">
                    <If.Then>
                      <Sequence sap:VirtualizedContainerService.HintSize="222,208">
                        <sap:WorkflowViewStateService.ViewState>
                          <scg:Dictionary x:TypeArguments="x:String, x:Object">
                            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                          </scg:Dictionary>
                        </sap:WorkflowViewStateService.ViewState>
                        <mpda:NewWinEvent DisplayName="New-WinEvent" sap:VirtualizedContainerService.HintSize="200,22" Payload="[{new PSObject(CollectionAlias), new PSObject(RDManagementResources.UserVhdShareIsAlreadyConfigured)}]" ProviderName="Microsoft-Windows-Rdms-UI" WinEventId="8237" />
                        <TerminateWorkflow sap:VirtualizedContainerService.HintSize="200,22" Reason="[RDManagementResources.UserVhdShareIsAlreadyConfigured]" />
                      </Sequence>
                    </If.Then>
                  </If>
                </Sequence>
              </ActivityAction>
            </ForEach>
            <Assign sap:VirtualizedContainerService.HintSize="516,60">
              <Assign.To>
                <OutArgument x:TypeArguments="x:String">[tempUserVHDShare]</OutArgument>
              </Assign.To>
              <Assign.Value>
                <InArgument x:TypeArguments="x:String">[UserVhdShare]</InArgument>
              </Assign.Value>
            </Assign>
          </Sequence>
        </If.Then>
      </If>
    </Sequence>
    <If Condition="[Not (UserVhdShare Is Nothing)]" DisplayName="CreateTemplateVhd" sap:VirtualizedContainerService.HintSize="824,793">
      <If.Then>
        <Sequence DisplayName="Create" sap:VirtualizedContainerService.HintSize="486,685">
          <Sequence.Variables>
            <Variable x:TypeArguments="x:String" Name="templateVhdPath" />
            <Variable x:TypeArguments="x:String" Name="scriptPath" />
            <Variable x:TypeArguments="x:Int64" Name="scriptDiskSize" />
            <Variable x:TypeArguments="x:String" Name="scriptDiskType" />
            <Variable x:TypeArguments="x:Int32" Default="0" Name="uvhdTemplateResult" />
          </Sequence.Variables>
          <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>
          <Assign sap:VirtualizedContainerService.HintSize="464,60">
            <Assign.To>
              <OutArgument x:TypeArguments="x:String">[templateVhdPath]</OutArgument>
            </Assign.To>
            <Assign.Value>
              <InArgument x:TypeArguments="x:String">[UserVhdShare &amp; "\UVHD-Template.vhdx"]</InArgument>
            </Assign.Value>
          </Assign>
          <Assign sap:VirtualizedContainerService.HintSize="464,60">
            <Assign.To>
              <OutArgument x:TypeArguments="x:Int64">[scriptDiskSize]</OutArgument>
            </Assign.To>
            <Assign.Value>
              <InArgument x:TypeArguments="x:Int64">[userDataVhdSetting.DiskSize \ BytesInGB]</InArgument>
            </Assign.Value>
          </Assign>
          <TryCatch sap:VirtualizedContainerService.HintSize="1147,1216">
            <TryCatch.Try>
              <Assign sap:VirtualizedContainerService.HintSize="242,60">
                <Assign.To>
                  <OutArgument x:TypeArguments="x:Int32">[uvhdTemplateResult]</OutArgument>
                </Assign.To>
                <Assign.Value>
                  <InArgument x:TypeArguments="x:Int32">[UserDataVhdUtility.CreateUserDiskTemplate(RDMSServer, CollectionAlias, UserVhdShare, scriptDiskSize)]</InArgument>
                </Assign.Value>
              </Assign>
            </TryCatch.Try>
            <TryCatch.Catches>
              <Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="490,21">
                <ActivityAction x:TypeArguments="s:Exception">
                  <ActivityAction.Argument>
                    <DelegateInArgument x:TypeArguments="s:Exception" Name="exception" />
                  </ActivityAction.Argument>
                  <TerminateWorkflow sap:VirtualizedContainerService.HintSize="200,22" Reason="[exception.Message]" />
                </ActivityAction>
              </Catch>
            </TryCatch.Catches>
          </TryCatch>
        </Sequence>
      </If.Then>
    </If>
    <Sequence DisplayName="UpdateUvhdSetting" sap:VirtualizedContainerService.HintSize="824,420">
      <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="242,60">
        <Assign.To>
          <OutArgument x:TypeArguments="x:String">[vmFarmSetting]</OutArgument>
        </Assign.To>
        <Assign.Value>
          <InArgument x:TypeArguments="x:String">[UserDataVhdUtility.SetUserDataVhdSetting(vmFarmSetting, -1, tempUserVHDShare, RemapMode, IncludeFileLocation, IncludeFolderLocation, ExcludeFileLocation, ExcludeFolderLocation)]</InArgument>
        </Assign.Value>
      </Assign>
      <InvokeMethod sap:VirtualizedContainerService.HintSize="242,134" MethodName="Add">
        <InvokeMethod.TargetObject>
          <InArgument x:TypeArguments="sc:Hashtable">[vmFarmProperties]</InArgument>
        </InvokeMethod.TargetObject>
        <InArgument x:TypeArguments="x:String">VmFarmSettings</InArgument>
        <InArgument x:TypeArguments="x:String">[vmFarmSetting]</InArgument>
      </InvokeMethod>
      <mpma:SetWmiInstance Arguments="[vmFarmProperties]" Authentication="[AuthenticationLevel.PacketPrivacy]" DisplayName="SetPoolWmi" sap:VirtualizedContainerService.HintSize="242,22" Impersonation="[ImpersonationLevel.Impersonate]" PSComputerName="[{RDMSServer}]" Path="[CType(vmPool(0).Properties(&quot;__PATH&quot;).Value, String)]" PutType="[PutType.UpdateOnly]" Result="[null]" />
    </Sequence>
    <mpda:NewWinEvent DisplayName="New-WinEvent" sap:VirtualizedContainerService.HintSize="824,22" Payload="[{new PSObject(CollectionAlias)}]" ProviderName="Microsoft-Windows-Rdms-UI" WinEventId="8238" />
    <mpua:WriteVerbose DisplayName="Verbose: Done" sap:VirtualizedContainerService.HintSize="824,22" Message="Done!" />
  </Sequence>
</Activity>
