---
updatedAt: 2025-08-14T13:35:05.000Z
agentTools:
  siteIndex: https://developer.n-able.com/llms.txt
  projectIndex: https://developer.n-able.com/n-central/llms.txt
---

# Download File If New Version is Available

```powershell Automation Policy
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Policy ID="607e9bbb-692b-4773-9568-b0c9e7c1b791" Name="Download File If Newer" Description="MS4gQ3JlYXRlIHRoZSBkZXNpdG5hdGlvbiBmb2xkZXIgaWYgaXQgZG9lc24ndCBleGlzdHMNCjIuIERvd25sb2FkIHRoZSByZW1vdGUgaGFzaA0KMy4gQ29tcGFyZSB0aGUgcmVtb3RlIGhhc2ggdG8gdGhlIGxvY2FsIGhhc2gNCjQuIERvd25sb2FkIHRoZSBmaWxlIGlmIG1pc3Npbmcgb3IgaGFzaCBkb2Vzbid0IG1hdGNoDQoNCioqIEFzc3VtZXMgdGhlIGhhc2ggaXMgYXZhaWxhYmxlIGF0IHVybC5oYXNo" Version="2.9.0.3" RemoteCategory="0" ExecutionType="Local" MinimumPSVersionRequired="0.0.0">
  <Object ID="{2e52a8e0-c332-448e-8719-a88aea1a65c4}" Type="{B6FA6D8B-EEAA-47A6-8463-7F9A4F5BBB6E}" Data="&lt;xml&gt;&lt;Parameters&gt;&lt;Parameter ParameterName=&quot;DestinationFolderName&quot; Label=&quot;Destination Folder&quot; ParameterType=&quot;string&quot; Value=&quot;&quot; /&gt;&lt;Parameter ParameterName=&quot;RemoteUrl&quot; Label=&quot;Remote Url&quot; ParameterType=&quot;string&quot; Value=&quot;&quot; /&gt;&lt;Parameter ParameterName=&quot;LocalFilename&quot; Label=&quot;Destination Filename&quot; ParameterType=&quot;string&quot; Value=&quot;&quot; /&gt;&lt;Parameter ParameterName=&quot;HashExt&quot; Label=&quot;Remote Hash Extension&quot; ParameterType=&quot;string&quot; Value=&quot;.hash&quot; /&gt;&lt;/Parameters&gt;&lt;OutputParameters&gt;&lt;Parameter ParameterName=&quot;FileUpdate&quot; Label=&quot;File Updated&quot; ParameterType=&quot;string&quot; Value=&quot;Global Variables.File Updated&quot; /&gt;&lt;/OutputParameters&gt;&lt;GlobalVariables&gt;&lt;Parameter ParameterName=&quot;FileUpdated&quot; Label=&quot;File Updated&quot; ParameterType=&quot;string&quot; Value=&quot;False&quot; /&gt;&lt;/GlobalVariables&gt;&lt;/xml&gt;" />
  <LinkManager xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PolicyExecutor">
    <hashset xmlns:d2p1="http://schemas.datacontract.org/2004/07/System">
      <d2p1:TupleOfstringstringstringstring>
        <d2p1:m_Item1>GlobalVariable.FileUpdated</d2p1:m_Item1>
        <d2p1:m_Item2>OutputObject</d2p1:m_Item2>
        <d2p1:m_Item3></d2p1:m_Item3>
        <d2p1:m_Item4>FileUpdate</d2p1:m_Item4>
      </d2p1:TupleOfstringstringstringstring>
    </hashset>
  </LinkManager>
  <Activity mc:Ignorable="sads sap" x:Class="Policy Builder" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:p="clr-namespace:PolicyExecutor;assembly=PolicyExecutionEngine" 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:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <x:Members>
      <x:Property Name="PolicyGUID" Type="InArgument(x:String)" />
    </x:Members>
    <sap:VirtualizedContainerService.HintSize>1126,2047</sap:VirtualizedContainerService.HintSize>
    <mva:VisualBasic.Settings>Assembly references and imported namespaces serialized as XML namespaces</mva:VisualBasic.Settings>
    <sap:WorkflowViewStateService.ViewState>
      <scg:Dictionary x:TypeArguments="x:String, x:Object">
        <x:Boolean x:Key="ShouldExpandAll">False</x:Boolean>
      </scg:Dictionary>
    </sap:WorkflowViewStateService.ViewState>
    <p:PolicySequence DisplayName="Policy Builder" sap:VirtualizedContainerService.HintSize="1126,2047" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
      <p:PolicySequence.Activities>
        <p:FolderExists Folder_Item="{x:Null}" Folder_ItemProp="{x:Null}" AssemblyName="PolicyExecutionEngine, Version=2.9.0.3, Culture=neutral, PublicKeyToken=null" Conditional="[FolderExists_Conditional]" DisplayName="Verify if destination exists" Folder="[DestinationFolderName]" Folder_DisplayArg="Input Parameters.Destination Folder" sap:VirtualizedContainerService.HintSize="1090,81" Moniker="3393ec6e-0247-49fd-9d5f-9dac158a95c8" Result="[FolderExists_Result]" ResultString="[FolderExists_ResultString]" RunAsCurrentLoggedOnUser="False" ScriptExecutionMethod="ExecuteDebug" TypeName="FolderExists" m_bTextLinkChange="False">
          <sap:WorkflowViewStateService.ViewState>
            <scg:Dictionary x:TypeArguments="x:String, x:Object">
              <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            </scg:Dictionary>
          </sap:WorkflowViewStateService.ViewState>
        </p:FolderExists>
        <p:IfObject Condition_Item="{x:Null}" Condition_ItemProp="{x:Null}" Value_Item="{x:Null}" Value_ItemProp="{x:Null}" Variable_Item="{x:Null}" Variable_ItemProp="{x:Null}" AssemblyName="PolicyExecutionEngine, Version=2.9.0.3, Culture=neutral, PublicKeyToken=null" Condition="equals" Condition_DisplayArg="equals" DisplayName="If destination doesn't exists" sap:VirtualizedContainerService.HintSize="1090,81" Moniker="eac88aba-af9f-4647-920a-8859549bf33b" Result="[IfObject_Result]" ResultString="[IfObject_ResultString]" RunAsCurrentLoggedOnUser="False" ScriptExecutionMethod="None" TypeName="IfObject" Value_DisplayArg="False" Value_Type="x:String" Variable="[FolderExists_Conditional]" Variable_DisplayArg="Verify if destination exists.Conditional" Variable_Type="x:String" m_bTextLinkChange="False">
          <p:IfObject.IfOption>
            <p:SequenceActivity DisplayName="Then create folder" sap:VirtualizedContainerService.HintSize="181,81" Name="SequenceActivity">
              <p:SequenceActivity.Activities>
                <p:CreateFolder Folder_Item="{x:Null}" Folder_ItemProp="{x:Null}" AssemblyName="PolicyExecutionEngine, Version=2.9.0.3, Culture=neutral, PublicKeyToken=null" DisplayName="Create Folder" Folder="[DestinationFolderName]" FolderInfo="[CreateFolder_FolderInfo]" Folder_DisplayArg="Input Parameters.Destination Folder" sap:VirtualizedContainerService.HintSize="335,81" Moniker="2d7b2349-83cf-4e8f-98e3-f84620f6a375" Result="[CreateFolder_Result]" ResultString="[CreateFolder_ResultString]" RunAsCurrentLoggedOnUser="False" ScriptExecutionMethod="ExecuteDebug" TypeName="CreateFolder" m_bTextLinkChange="False">
                  <sap:WorkflowViewStateService.ViewState>
                    <scg:Dictionary x:TypeArguments="x:String, x:Object">
                      <x:Boolean x:Key="IsExpanded">False</x:Boolean>
                    </scg:Dictionary>
                  </sap:WorkflowViewStateService.ViewState>
                </p:CreateFolder>
              </p:SequenceActivity.Activities>
              <p:SequenceActivity.Variables>
                <Variable x:TypeArguments="x:String" Name="CreateFolder_FolderInfo" />
                <Variable x:TypeArguments="x:String" Name="CreateFolder_ResultString" />
                <Variable x:TypeArguments="x:Double" Name="CreateFolder_Result" />
              </p:SequenceActivity.Variables>
              <sap:WorkflowViewStateService.ViewState>
                <scg:Dictionary x:TypeArguments="x:String, x:Object">
                  <x:Boolean x:Key="IsExpanded">False</x:Boolean>
                </scg:Dictionary>
              </sap:WorkflowViewStateService.ViewState>
            </p:SequenceActivity>
          </p:IfObject.IfOption>
          <p:IfObject.Value>
            <InArgument x:TypeArguments="x:Object">
              <p:ObjectLiteral Value="False" />
            </InArgument>
          </p:IfObject.Value>
          <sap:WorkflowViewStateService.ViewState>
            <scg:Dictionary x:TypeArguments="x:String, x:Object">
              <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            </scg:Dictionary>
          </sap:WorkflowViewStateService.ViewState>
        </p:IfObject>
        <p:RunPowerShellScript AssemblyName="PolicyExecutionEngine, Version=2.9.0.3, Culture=neutral, PublicKeyToken=null" DisplayName="Get Remote Hash" sap:VirtualizedContainerService.HintSize="1090,81" Moniker="c32061d4-8cd3-4304-8bd9-c1fcb04f3e68" OutPut_64="[RunPowerShellScript_OutPut_64]" Result="[RunPowerShellScript_Result]" ResultString="[RunPowerShellScript_ResultString]" Results_x64="[RunPowerShellScript_Results_x64]" RunAsCurrentLoggedOnUser="False" ScriptExecutionMethod="ExecuteDebug" TypeName="RunPowerShellScript" genArgEvent="56f67306-6ac7-47cc-b135-fe6c8a7d36e0" m_bTextLinkChange="False" script="JAB1AHIAbAAgAD0AIAAkAFIAZQBtAG8AdABlAEYAaQBsAGUAVQByAGwAIAArACAAJABIAGEAcwBoAEUAeAB0AA0ACgANAAoAJABIAGEAcwBoAFYAYQBsAHUAZQAgAD0AIAAoAE4AZQB3AC0ATwBiAGoAZQBjAHQAIABTAHkAcwB0AGUAbQAuAE4AZQB0AC4AVwBlAGIAQwBsAGkAZQBuAHQAKQAuAEQAbwB3AG4AbABvAGEAZABTAHQAcgBpAG4AZwAoACQAdQByAGwAKQA=">
          <p:RunPowerShellScript.InArgs>
            <p:InArg Item="{x:Null}" ItemProp="{x:Null}" x:Key="RemoteFileUrl" ArgType="string" DisplayArg="Input Parameters.Remote Url" DisplayName="Remote File Url" Name="RemoteFileUrl" isRequired="False">
              <p:InArg.Arg>
                <InArgument x:TypeArguments="x:String">[RemoteUrl]</InArgument>
              </p:InArg.Arg>
            </p:InArg>
            <p:InArg Item="{x:Null}" ItemProp="{x:Null}" x:Key="HashExt" ArgType="string" DisplayArg="Input Parameters.Remote Hash Extension" DisplayName="HashExt" Name="HashExt" isRequired="False">
              <p:InArg.Arg>
                <InArgument x:TypeArguments="x:String">[HashExt]</InArgument>
              </p:InArg.Arg>
            </p:InArg>
          </p:RunPowerShellScript.InArgs>
          <p:RunPowerShellScript.OutArgs>
            <p:OutArg x:Key="HashValue" ArgType="string" DisplayName="Remote Hash Value" Name="HashValue">
              <p:OutArg.Arg>
                <OutArgument x:TypeArguments="x:String">[RunPowerShellScript_HashValue]</OutArgument>
              </p:OutArg.Arg>
            </p:OutArg>
          </p:RunPowerShellScript.OutArgs>
          <sap:WorkflowViewStateService.ViewState>
            <scg:Dictionary x:TypeArguments="x:String, x:Object">
              <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            </scg:Dictionary>
          </sap:WorkflowViewStateService.ViewState>
        </p:RunPowerShellScript>
        <p:FormatString Input0_Item="{x:Null}" Input0_ItemProp="{x:Null}" Input1_Item="{x:Null}" Input1_ItemProp="{x:Null}" Text_Item="{x:Null}" Text_ItemProp="{x:Null}" AssemblyName="PolicyExecutionEngine, Version=2.9.0.3, Culture=neutral, PublicKeyToken=null" DisplayName="Full Local Path" FormattedString="[FormatString_FormattedString]" sap:VirtualizedContainerService.HintSize="1090,81" Input0="[DestinationFolderName]" Input0_DisplayArg="Input Parameters.Destination Folder" Input1="[LocalFilename]" Input1_DisplayArg="Input Parameters.Destination Filename" Moniker="02ba3044-aea6-4881-8929-f0b3d929a19f" Result="[FormatString_Result]" ResultString="[FormatString_ResultString]" RunAsCurrentLoggedOnUser="False" ScriptExecutionMethod="ExecuteDebug" Text="{}{0}\{1}" Text_DisplayArg="{}{0}\{1}" TypeName="FormatString" m_bTextLinkChange="False">
          <sap:WorkflowViewStateService.ViewState>
            <scg:Dictionary x:TypeArguments="x:String, x:Object">
              <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            </scg:Dictionary>
          </sap:WorkflowViewStateService.ViewState>
        </p:FormatString>
        <p:FileExists File_Item="{x:Null}" File_ItemProp="{x:Null}" AssemblyName="PolicyExecutionEngine, Version=2.9.0.3, Culture=neutral, PublicKeyToken=null" Conditional="[FileExists_Conditional]" DisplayName="Verify If Local File Exists" File="[FormatString_FormattedString]" File_DisplayArg="Full Local Path.FormattedString" sap:VirtualizedContainerService.HintSize="1090,88" Moniker="fdf640ec-8bb7-4986-abcc-6994a8bab9b5" Result="[FileExists_Result]" ResultString="[FileExists_ResultString]" RunAsCurrentLoggedOnUser="False" ScriptExecutionMethod="ExecuteDebug" TypeName="FileExists" m_bTextLinkChange="False" />
        <p:IfElse Condition_Item="{x:Null}" Condition_ItemProp="{x:Null}" Value_Item="{x:Null}" Value_ItemProp="{x:Null}" Variable_Item="{x:Null}" Variable_ItemProp="{x:Null}" AssemblyName="PolicyExecutionEngine, Version=2.9.0.3, Culture=neutral, PublicKeyToken=null" Condition="equals" Condition_DisplayArg="equals" DisplayName="If local File exists compare Hash Else download" sap:VirtualizedContainerService.HintSize="1090,1212" Moniker="2ffc1ded-892b-40c3-97cb-11e6f3b7620c" Result="[IfElse_Result]" ResultString="[IfElse_ResultString]" RunAsCurrentLoggedOnUser="False" ScriptExecutionMethod="None" TypeName="IfElse" Value_DisplayArg="True" Value_Type="x:String" Variable="[FileExists_Conditional]" Variable_DisplayArg="Verify If Local File Exists.Conditional" Variable_Type="x:String" m_bTextLinkChange="False">
          <p:IfElse.ElseOption>
            <p:SequenceActivity DisplayName="Else" sap:VirtualizedContainerService.HintSize="488,532" Name="SequenceActivity">
              <p:SequenceActivity.Activities>
                <p:DownloadFileFromURL OverwriteExistingFile_Item="{x:Null}" OverwriteExistingFile_ItemProp="{x:Null}" RemoteFileURL_Item="{x:Null}" RemoteFileURL_ItemProp="{x:Null}" SaveAsFileName_Item="{x:Null}" SaveAsFileName_ItemProp="{x:Null}" AssemblyName="PolicyExecutionEngine, Version=2.9.0.3, Culture=neutral, PublicKeyToken=null" DisplayName="Download File From URL" sap:VirtualizedContainerService.HintSize="450,160" Moniker="03ff6bbe-92a7-40d4-9b8b-fae1d7a09b26" OverwriteExistingFile="True" OverwriteExistingFile_DisplayArg="true" RemoteFileURL="[RemoteUrl]" RemoteFileURL_DisplayArg="Input Parameters.Remote Url" Result="[DownloadFileFromURL_Result]" ResultString="[DownloadFileFromURL_ResultString]" RunAsCurrentLoggedOnUser="False" SaveAsFileName="[FormatString_FormattedString]" SaveAsFileName_DisplayArg="Full Local Path.FormattedString" ScriptExecutionMethod="ExecuteDebug" TypeName="DownloadFileFromURL" m_bTextLinkChange="False" />
                <p:Assignment Value_Item="{x:Null}" Value_ItemProp="{x:Null}" Variable_Item="{x:Null}" Variable_ItemProp="{x:Null}" AssemblyName="PolicyExecutionEngine, Version=2.9.0.3, Culture=neutral, PublicKeyToken=null" DisplayName="Set Ouput Variable" sap:VirtualizedContainerService.HintSize="450,182" Moniker="85a5cea5-1b90-4589-8dc0-44c18c02b901" Result="[Assignment_Result]" ResultString="[Assignment_ResultString]" RunAsCurrentLoggedOnUser="False" ScriptExecutionMethod="None" TypeName="Assignment" Value_DisplayArg="True" Value_Type="x:String" Variable="[FileUpdated]" Variable_DisplayArg="Global Variables.File Updated" Variable_Type="x:String" m_bTextLinkChange="False">
                  <p:Assignment.Value>
                    <InArgument x:TypeArguments="x:Object">
                      <p:ObjectLiteral Value="True" />
                    </InArgument>
                  </p:Assignment.Value>
                </p:Assignment>
              </p:SequenceActivity.Activities>
              <p:SequenceActivity.Variables>
                <Variable x:TypeArguments="x:String" Name="DownloadFileFromURL_ResultString" />
                <Variable x:TypeArguments="x:Double" Name="DownloadFileFromURL_Result" />
                <Variable x:TypeArguments="x:String" Name="Assignment_ResultString" />
                <Variable x:TypeArguments="x:Double" Name="Assignment_Result" />
              </p:SequenceActivity.Variables>
            </p:SequenceActivity>
          </p:IfElse.ElseOption>
          <p:IfElse.IfOption>
            <p:SequenceActivity DisplayName="Then (File Exists)" sap:VirtualizedContainerService.HintSize="558,1011" Name="SequenceActivity">
              <p:SequenceActivity.Activities>
                <p:CalculateFileSHA512 FileName_Item="{x:Null}" FileName_ItemProp="{x:Null}" AssemblyName="PolicyExecutionEngine, Version=2.9.0.3, Culture=neutral, PublicKeyToken=null" DisplayName="Local File SHA512" FileName="[FormatString_FormattedString]" FileName_DisplayArg="Full Local Path.FormattedString" Hash="[CalculateFileSHA512_Hash]" sap:VirtualizedContainerService.HintSize="520,88" Moniker="fb85e32f-8fc0-4d98-bbd5-dea650fb5f1b" Result="[CalculateFileSHA512_Result]" ResultString="[CalculateFileSHA512_ResultString]" RunAsCurrentLoggedOnUser="False" ScriptExecutionMethod="ExecuteDebug" TypeName="CalculateFileSHA512" m_bTextLinkChange="False" />
                <p:IfObject Condition_Item="{x:Null}" Condition_ItemProp="{x:Null}" Value_Item="{x:Null}" Value_ItemProp="{x:Null}" Variable_Item="{x:Null}" Variable_ItemProp="{x:Null}" AssemblyName="PolicyExecutionEngine, Version=2.9.0.3, Culture=neutral, PublicKeyToken=null" Condition="does not equal" Condition_DisplayArg="does not equal" DisplayName="If hash does not match download new file" sap:VirtualizedContainerService.HintSize="520,733" Moniker="12b76867-07a8-4232-b350-7f6b3bdec95f" Result="[IfObject_Result_1]" ResultString="[IfObject_ResultString_1]" RunAsCurrentLoggedOnUser="False" ScriptExecutionMethod="None" TypeName="IfObject" Value="[RunPowerShellScript_HashValue]" Value_DisplayArg="Get Remote Hash.Remote Hash Value" Value_Type="x:String" Variable="[CalculateFileSHA512_Hash]" Variable_DisplayArg="Local File SHA512.Hash" Variable_Type="x:String" m_bTextLinkChange="False">
                  <p:IfObject.IfOption>
                    <p:SequenceActivity DisplayName="Then" sap:VirtualizedContainerService.HintSize="488,532" Name="SequenceActivity">
                      <p:SequenceActivity.Activities>
                        <p:DownloadFileFromURL OverwriteExistingFile_Item="{x:Null}" OverwriteExistingFile_ItemProp="{x:Null}" RemoteFileURL_Item="{x:Null}" RemoteFileURL_ItemProp="{x:Null}" SaveAsFileName_Item="{x:Null}" SaveAsFileName_ItemProp="{x:Null}" AssemblyName="PolicyExecutionEngine, Version=2.9.0.3, Culture=neutral, PublicKeyToken=null" DisplayName="Download File From URL" sap:VirtualizedContainerService.HintSize="450,160" Moniker="6ced9b67-8ff3-4f04-ba52-c93856e920e5" OverwriteExistingFile="True" OverwriteExistingFile_DisplayArg="true" RemoteFileURL="[RemoteUrl]" RemoteFileURL_DisplayArg="Input Parameters.Remote Url" Result="[DownloadFileFromURL_Result_1]" ResultString="[DownloadFileFromURL_ResultString_1]" RunAsCurrentLoggedOnUser="False" SaveAsFileName="[FormatString_FormattedString]" SaveAsFileName_DisplayArg="Full Local Path.FormattedString" ScriptExecutionMethod="ExecuteDebug" TypeName="DownloadFileFromURL" m_bTextLinkChange="False" />
                        <p:Assignment Value_Item="{x:Null}" Value_ItemProp="{x:Null}" Variable_Item="{x:Null}" Variable_ItemProp="{x:Null}" AssemblyName="PolicyExecutionEngine, Version=2.9.0.3, Culture=neutral, PublicKeyToken=null" DisplayName="Set Ouput Variable" sap:VirtualizedContainerService.HintSize="450,182" Moniker="39bcf6f6-242e-4af4-9584-37afbda2a731" Result="[Assignment_Result_1]" ResultString="[Assignment_ResultString_1]" RunAsCurrentLoggedOnUser="False" ScriptExecutionMethod="None" TypeName="Assignment" Value_DisplayArg="True" Value_Type="x:String" Variable="[FileUpdated]" Variable_DisplayArg="Global Variables.File Updated" Variable_Type="x:String" m_bTextLinkChange="False">
                          <p:Assignment.Value>
                            <InArgument x:TypeArguments="x:Object">
                              <p:ObjectLiteral Value="True" />
                            </InArgument>
                          </p:Assignment.Value>
                        </p:Assignment>
                      </p:SequenceActivity.Activities>
                      <p:SequenceActivity.Variables>
                        <Variable x:TypeArguments="x:String" Name="DownloadFileFromURL_ResultString_1" />
                        <Variable x:TypeArguments="x:Double" Name="DownloadFileFromURL_Result_1" />
                        <Variable x:TypeArguments="x:String" Name="Assignment_ResultString_1" />
                        <Variable x:TypeArguments="x:Double" Name="Assignment_Result_1" />
                      </p:SequenceActivity.Variables>
                    </p:SequenceActivity>
                  </p:IfObject.IfOption>
                </p:IfObject>
              </p:SequenceActivity.Activities>
              <p:SequenceActivity.Variables>
                <Variable x:TypeArguments="x:String" Name="CalculateFileSHA512_Hash" />
                <Variable x:TypeArguments="x:String" Name="CalculateFileSHA512_ResultString" />
                <Variable x:TypeArguments="x:Double" Name="CalculateFileSHA512_Result" />
                <Variable x:TypeArguments="x:String" Name="IfObject_ResultString_1" />
                <Variable x:TypeArguments="x:Double" Name="IfObject_Result_1" />
              </p:SequenceActivity.Variables>
            </p:SequenceActivity>
          </p:IfElse.IfOption>
          <p:IfElse.Value>
            <InArgument x:TypeArguments="x:Object">
              <p:ObjectLiteral Value="True" />
            </InArgument>
          </p:IfElse.Value>
        </p:IfElse>
      </p:PolicySequence.Activities>
      <p:PolicySequence.Variables>
        <Variable x:TypeArguments="x:String" Name="FolderExists_Conditional" />
        <Variable x:TypeArguments="x:String" Name="FolderExists_ResultString" />
        <Variable x:TypeArguments="x:Double" Name="FolderExists_Result" />
        <Variable x:TypeArguments="x:String" Name="IfObject_ResultString" />
        <Variable x:TypeArguments="x:Double" Name="IfObject_Result" />
        <Variable x:TypeArguments="x:String" Name="RunPowerShellScript_OutPut_64" />
        <Variable x:TypeArguments="x:String" Name="RunPowerShellScript_ResultString" />
        <Variable x:TypeArguments="scg:IEnumerable(x:Object)" Name="RunPowerShellScript_Results_x64" />
        <Variable x:TypeArguments="x:Double" Name="RunPowerShellScript_Result" />
        <Variable x:TypeArguments="x:String" Name="RunPowerShellScript_HashValue" />
        <Variable x:TypeArguments="x:String" Name="FileExists_Conditional" />
        <Variable x:TypeArguments="x:String" Name="FileExists_ResultString" />
        <Variable x:TypeArguments="x:Double" Name="FileExists_Result" />
        <Variable x:TypeArguments="x:String" Name="FormatString_FormattedString" />
        <Variable x:TypeArguments="x:String" Name="FormatString_ResultString" />
        <Variable x:TypeArguments="x:Double" Name="FormatString_Result" />
        <Variable x:TypeArguments="x:String" Name="IfElse_ResultString" />
        <Variable x:TypeArguments="x:Double" Name="IfElse_Result" />
        <Variable x:TypeArguments="x:String" Name="DestinationFolderName" />
        <Variable x:TypeArguments="x:String" Name="RemoteUrl" />
        <Variable x:TypeArguments="x:String" Name="LocalFilename" />
        <Variable x:TypeArguments="x:String" Name="HashExt" />
        <Variable x:TypeArguments="x:String" Name="FileUpdated" />
      </p:PolicySequence.Variables>
    </p:PolicySequence>
  </Activity>
</Policy>
```

```json Response Example
{"success":true}
```

# SCRIPT