﻿<Activity mc:Ignorable="sads sap" x:Class="Microsoft.PowerShell.DynamicActivities._45484e3c882545fd834f90530e943751" sap:VirtualizedContainerService.HintSize="440,440" mva:VisualBasic.Settings="Assembly references and imported namespaces for internal implementation"
 xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
 xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:mpa="clr-namespace:Microsoft.PowerShell.Activities;assembly=Microsoft.PowerShell.Activities"
 xmlns:mpc="clr-namespace:Microsoft.PowerShell.Commands;assembly=System.Management.Automation"
 xmlns:mpc1="clr-namespace:Microsoft.PowerShell.Commands;assembly=Microsoft.PowerShell.Workflow.ServiceCore"
 xmlns:mpc2="clr-namespace:Microsoft.PowerShell.Commands;assembly=Microsoft.PowerShell.Commands.Diagnostics"
 xmlns:mpc3="clr-namespace:Microsoft.PowerShell.Commands;assembly=Microsoft.PowerShell.Commands.Utility"
 xmlns:mpc4="clr-namespace:Microsoft.PowerShell.Commands;assembly=Microsoft.PowerShell.ConsoleHost"
 xmlns:mpc5="clr-namespace:Microsoft.PowerShell.Commands;assembly=Microsoft.PowerShell.Commands.Management"
 xmlns:mpc6="clr-namespace:Microsoft.PowerShell.Commands;assembly=Microsoft.PowerShell.Security"
 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:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities"
 xmlns:s="clr-namespace:System;assembly=mscorlib"
 xmlns:s1="clr-namespace:System;assembly=System"
 xmlns:s2="clr-namespace:System;assembly=System.Core"
 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: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="LocalServer" Type="InArgument(x:Boolean)" />
  </x:Members>
  <Sequence sap:VirtualizedContainerService.HintSize="222,175">
    <Sequence.Variables>
      <Variable x:TypeArguments="x:Boolean" Default="True" Name="PSRunInProcessPreference" />
      <Variable x:TypeArguments="x:Boolean" Default="False" Name="PSPersistPreference" />
      <Variable x:TypeArguments="s:DateTime" Name="startTime" />
      <Variable x:TypeArguments="x:Int32" Default="[60 * 5]" Name="waitTimeInSeconds" />
      <Variable x:TypeArguments="x:Boolean" Name="targetWasSet" />
    </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>
    <Flowchart sap:VirtualizedContainerService.HintSize="674,757">
      <Flowchart.Variables>
        <Variable x:TypeArguments="s:String[]" Default="[{}]" Name="target" />
      </Flowchart.Variables>
      <sap:WorkflowViewStateService.ViewState>
        <scg:Dictionary x:TypeArguments="x:String, x:Object">
          <x:Boolean x:Key="IsExpanded">False</x:Boolean>
          <av:Point x:Key="ShapeLocation">270,0</av:Point>
          <av:Size x:Key="ShapeSize">60,75</av:Size>
          <x:Double x:Key="Width">660</x:Double>
          <x:Double x:Key="Height">721</x:Double>
          <av:PointCollection x:Key="ConnectorLocation">300,75 300,99</av:PointCollection>
        </scg:Dictionary>
      </sap:WorkflowViewStateService.ViewState>
      <Flowchart.StartNode>
        <FlowStep x:Name="__ReferenceID0">
          <sap:WorkflowViewStateService.ViewState>
            <scg:Dictionary x:TypeArguments="x:String, x:Object">
              <av:Point x:Key="ShapeLocation">200,99</av:Point>
              <av:Size x:Key="ShapeSize">200,22</av:Size>
              <av:PointCollection x:Key="ConnectorLocation">300,121 300,147</av:PointCollection>
            </scg:Dictionary>
          </sap:WorkflowViewStateService.ViewState>
          <mpa:GetPSWorkflowData x:TypeArguments="s:String[]" DisplayName="Get target computer name" sap:VirtualizedContainerService.HintSize="200,22" Result="[target]" VariableToRetrieve="PSComputerName" />
          <FlowStep.Next>
            <FlowStep x:Name="__ReferenceID7">
              <sap:WorkflowViewStateService.ViewState>
                <scg:Dictionary x:TypeArguments="x:String, x:Object">
                  <av:Point x:Key="ShapeLocation">124,147</av:Point>
                  <av:Size x:Key="ShapeSize">352,132</av:Size>
                  <av:PointCollection x:Key="ConnectorLocation">300,279 300,316.5</av:PointCollection>
                </scg:Dictionary>
              </sap:WorkflowViewStateService.ViewState>
              <mpa:PowerShellValue x:TypeArguments="x:Boolean" DisplayName="See if  the computername was set" Expression="# test for forms of localhost&#xD;&#xA;[bool] $target -and    '.', 'localhost' -notcontains $target" sap:VirtualizedContainerService.HintSize="352,132" Result="[targetWasSet]">
                <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:PowerShellValue>
              <FlowStep.Next>
                <FlowDecision x:Name="__ReferenceID1" Condition="[targetWasSet]" sap:VirtualizedContainerService.HintSize="70,87">
                  <sap:WorkflowViewStateService.ViewState>
                    <scg:Dictionary x:TypeArguments="x:String, x:Object">
                      <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                      <av:Point x:Key="ShapeLocation">265,316.5</av:Point>
                      <av:Size x:Key="ShapeSize">70,87</av:Size>
                      <av:PointCollection x:Key="TrueConnector">265,360 140,360 140,410</av:PointCollection>
                      <av:PointCollection x:Key="FalseConnector">335,360 560,360 560,409</av:PointCollection>
                    </scg:Dictionary>
                  </sap:WorkflowViewStateService.ViewState>
                  <FlowDecision.True>
                    <FlowStep x:Name="__ReferenceID3">
                      <sap:WorkflowViewStateService.ViewState>
                        <scg:Dictionary x:TypeArguments="x:String, x:Object">
                          <av:Point x:Key="ShapeLocation">19,410</av:Point>
                          <av:Size x:Key="ShapeSize">242,60</av:Size>
                          <av:PointCollection x:Key="ConnectorLocation">140,470 140,509</av:PointCollection>
                        </scg:Dictionary>
                      </sap:WorkflowViewStateService.ViewState>
                      <Assign DisplayName="Record the start time of the reset" sap:VirtualizedContainerService.HintSize="242,60">
                        <Assign.To>
                          <OutArgument x:TypeArguments="s:DateTime">[startTime]</OutArgument>
                        </Assign.To>
                        <Assign.Value>
                          <InArgument x:TypeArguments="s:DateTime">[System.DateTime.Now]</InArgument>
                        </Assign.Value>
                      </Assign>
                      <FlowStep.Next>
                        <FlowStep x:Name="__ReferenceID4">
                          <sap:WorkflowViewStateService.ViewState>
                            <scg:Dictionary x:TypeArguments="x:String, x:Object">
                              <av:Point x:Key="ShapeLocation">40,509</av:Point>
                              <av:Size x:Key="ShapeSize">200,22</av:Size>
                              <av:PointCollection x:Key="ConnectorLocation">140,531 140,561 250,561 250,586.5</av:PointCollection>
                            </scg:Dictionary>
                          </sap:WorkflowViewStateService.ViewState>
                          <mpma:RestartComputer DisplayName="Restart remote computer" For="[Microsoft.PowerShell.Commands.WaitForServiceTypes.WinRM]" Force="[true]" sap:VirtualizedContainerService.HintSize="200,22" PSComputerName="[target]" Protocol="wsman" Timeout="[waitTimeInSeconds]" Wait="[true]" />
                          <FlowStep.Next>
                            <FlowDecision x:Name="__ReferenceID5" Condition="[System.DateTime.Now &lt; StartTime.AddSeconds(waitTimeInSeconds)]" sap:VirtualizedContainerService.HintSize="70,87">
                              <sap:WorkflowViewStateService.ViewState>
                                <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                  <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                                  <av:Point x:Key="ShapeLocation">215,586.5</av:Point>
                                  <av:Size x:Key="ShapeSize">70,87</av:Size>
                                  <av:PointCollection x:Key="FalseConnector">285,630 350,630 350,689</av:PointCollection>
                                </scg:Dictionary>
                              </sap:WorkflowViewStateService.ViewState>
                              <FlowDecision.False>
                                <FlowStep x:Name="__ReferenceID6">
                                  <sap:WorkflowViewStateService.ViewState>
                                    <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                      <av:Point x:Key="ShapeLocation">250,689</av:Point>
                                      <av:Size x:Key="ShapeSize">200,22</av:Size>
                                    </scg:Dictionary>
                                  </sap:WorkflowViewStateService.ViewState>
                                  <mpua:WriteError Category="[System.Management.Automation.ErrorCategory.OperationTimeout]" CategoryReason="CannotRestartComputer" DisplayName="Emit error on timeout" sap:VirtualizedContainerService.HintSize="200,22" Message="[&quot;Restart-Server of computer '&quot; &amp; target(0) &amp; &quot;'failed&quot;]">
                                    <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:WriteError>
                                </FlowStep>
                              </FlowDecision.False>
                            </FlowDecision>
                          </FlowStep.Next>
                        </FlowStep>
                      </FlowStep.Next>
                    </FlowStep>
                  </FlowDecision.True>
                  <FlowDecision.False>
                    <FlowStep x:Name="__ReferenceID2">
                      <sap:WorkflowViewStateService.ViewState>
                        <scg:Dictionary x:TypeArguments="x:String, x:Object">
                          <av:Point x:Key="ShapeLocation">460,409</av:Point>
                          <av:Size x:Key="ShapeSize">200,22</av:Size>
                        </scg:Dictionary>
                      </sap:WorkflowViewStateService.ViewState>
                      <mpma:RestartComputer DisplayName="Restart local computer" Force="[true]" sap:VirtualizedContainerService.HintSize="200,22" PSComputerName="[{}]" />
                    </FlowStep>
                  </FlowDecision.False>
                </FlowDecision>
              </FlowStep.Next>
            </FlowStep>
          </FlowStep.Next>
        </FlowStep>
      </Flowchart.StartNode>
      <x:Reference>__ReferenceID0</x:Reference>
      <x:Reference>__ReferenceID1</x:Reference>
      <x:Reference>__ReferenceID2</x:Reference>
      <x:Reference>__ReferenceID3</x:Reference>
      <x:Reference>__ReferenceID4</x:Reference>
      <x:Reference>__ReferenceID5</x:Reference>
      <x:Reference>__ReferenceID6</x:Reference>
      <x:Reference>__ReferenceID7</x:Reference>
    </Flowchart>
  </Sequence>
</Activity>