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

# VEEAM Backup for Office 365 v2.0

```powershell Automation Policy
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Policy ID="a5f70249-8c6e-4827-9ed1-e59b089d9cdd" Name="VEEAM Backup for Office 365 v2.0" Description="VkVFQU0gQmFja3VwIGZvciBPZmZpY2UgMzY1IHYyLjA=" Version="2.10.0.19" RemoteCategory="0" ExecutionType="Local" MinimumPSVersionRequired="0.0.0">
  <Object ID="{16a9450a-c7a0-48f5-a266-85c4f9a0cf3d}" Type="{B6FA6D8B-EEAA-47A6-8463-7F9A4F5BBB6E}" Data="&lt;xml&gt;&lt;OutputParameters&gt;&lt;Parameter ParameterName=&quot;JobRunTime&quot; Label=&quot;Job run time less than 24 hours?&quot; ParameterType=&quot;number&quot; Value=&quot;Date Difference - Job run time.Difference&quot; /&gt;&lt;Parameter ParameterName=&quot;VBOJobName&quot; Label=&quot;VEEAM MS365 Job Name&quot; ParameterType=&quot;string&quot; Value=&quot;Run PowerShell Script.VBO Job Name&quot; /&gt;&lt;Parameter ParameterName=&quot;JobEndTime&quot; Label=&quot;Last job ended within 24 hours of script execution&quot; ParameterType=&quot;number&quot; Value=&quot;Date Difference - Last Job end time.Difference&quot; /&gt;&lt;Parameter ParameterName=&quot;scriptexecuting&quot; Label=&quot;Is the script executing regularly?&quot; ParameterType=&quot;number&quot; Value=&quot;Date Difference - Is script executing regularly?.Difference&quot; /&gt;&lt;Parameter ParameterName=&quot;finalStatus&quot; Label=&quot;Converted Final Status&quot; ParameterType=&quot;number&quot; Value=&quot;Run PowerShell Script.Converted Final Status&quot; /&gt;&lt;/OutputParameters&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>f1842b29-00b4-4818-a1ac-9914b74b02d3.Difference</d2p1:m_Item1>
        <d2p1:m_Item2>OutputObject</d2p1:m_Item2>
        <d2p1:m_Item3></d2p1:m_Item3>
        <d2p1:m_Item4>JobRunTime</d2p1:m_Item4>
      </d2p1:TupleOfstringstringstringstring>
      <d2p1:TupleOfstringstringstringstring>
        <d2p1:m_Item1>bd8c93af-af5d-4300-b076-dacf13eb8c6b.VBOJobName</d2p1:m_Item1>
        <d2p1:m_Item2>OutputObject</d2p1:m_Item2>
        <d2p1:m_Item3></d2p1:m_Item3>
        <d2p1:m_Item4>VBOJobName</d2p1:m_Item4>
      </d2p1:TupleOfstringstringstringstring>
      <d2p1:TupleOfstringstringstringstring>
        <d2p1:m_Item1>3a5cddf3-ad25-43c4-bbd5-e101935e320e.Difference</d2p1:m_Item1>
        <d2p1:m_Item2>OutputObject</d2p1:m_Item2>
        <d2p1:m_Item3></d2p1:m_Item3>
        <d2p1:m_Item4>JobEndTime</d2p1:m_Item4>
      </d2p1:TupleOfstringstringstringstring>
      <d2p1:TupleOfstringstringstringstring>
        <d2p1:m_Item1>6d846e83-2743-48af-b21f-05973b4c60d2.Difference</d2p1:m_Item1>
        <d2p1:m_Item2>OutputObject</d2p1:m_Item2>
        <d2p1:m_Item3></d2p1:m_Item3>
        <d2p1:m_Item4>scriptexecuting</d2p1:m_Item4>
      </d2p1:TupleOfstringstringstringstring>
      <d2p1:TupleOfstringstringstringstring>
        <d2p1:m_Item1>bd8c93af-af5d-4300-b076-dacf13eb8c6b.finalStatus</d2p1:m_Item1>
        <d2p1:m_Item2>OutputObject</d2p1:m_Item2>
        <d2p1:m_Item3></d2p1:m_Item3>
        <d2p1:m_Item4>finalStatus</d2p1:m_Item4>
      </d2p1:TupleOfstringstringstringstring>
    </hashset>
  </LinkManager>
  <Diagnostics OriginalVersion="2.16.1.15" />
  <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:s="clr-namespace:System;assembly=mscorlib" 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>490,1615</sap:VirtualizedContainerService.HintSize>
    <mva:VisualBasic.Settings>Assembly references and imported namespaces serialized as XML namespaces</mva:VisualBasic.Settings>
    <p:PolicySequence DisplayName="Policy Builder" sap:VirtualizedContainerService.HintSize="490,1615" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
      <p:PolicySequence.Activities>
        <p:RunPowerShellScript AssemblyName="PolicyExecutionEngine, Version=2.14.0.2, Culture=neutral, PublicKeyToken=null" DisplayName="Run PowerShell Script" sap:VirtualizedContainerService.HintSize="454,348" Moniker="bd8c93af-af5d-4300-b076-dacf13eb8c6b" OutPut_64="[RunPowerShellScript_OutPut_64]" Result="[RunPowerShellScript_Result]" ResultString="[RunPowerShellScript_ResultString]" Results_x64="[RunPowerShellScript_Results_x64]" RunAsCurrentLoggedOnUser="False" ScriptExecutionMethod="ExecuteDebug" TypeName="RunPowerShellScript" genArgEvent="39c98532-2a28-414d-94dc-4ff8f026f148" m_bTextLinkChange="False" script="JABTAGMAcgBpAHAAdABFAHgAZQBjAHUAdABpAG8AbgBEAGEAdABlACAAPQAgAEcAZQB0AC0ARABhAHQAZQANAAoADQAKACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwA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          </p:RunPowerShellScript.InArgs>
          <p:RunPowerShellScript.OutArgs>
            <p:OutArg x:Key="lastVBOJobStatus" ArgType="string" DisplayName="Last VBO Job Status" Name="lastVBOJobStatus">
              <p:OutArg.Arg>
                <OutArgument x:TypeArguments="x:String">[RunPowerShellScript_lastVBOJobStatus]</OutArgument>
              </p:OutArg.Arg>
            </p:OutArg>
            <p:OutArg x:Key="VBOJobName" ArgType="string" DisplayName="VBO Job Name" Name="VBOJobName">
              <p:OutArg.Arg>
                <OutArgument x:TypeArguments="x:String">[RunPowerShellScript_VBOJobName]</OutArgument>
              </p:OutArg.Arg>
            </p:OutArg>
            <p:OutArg x:Key="VBOJobStartTime" ArgType="date" DisplayName="VBO Job Start Time" Name="VBOJobStartTime">
              <p:OutArg.Arg>
                <OutArgument x:TypeArguments="s:DateTime">[RunPowerShellScript_VBOJobStartTime]</OutArgument>
              </p:OutArg.Arg>
            </p:OutArg>
            <p:OutArg x:Key="VBOJobEndTime" ArgType="date" DisplayName="Last VBO Job End Time" Name="VBOJobEndTime">
              <p:OutArg.Arg>
                <OutArgument x:TypeArguments="s:DateTime">[RunPowerShellScript_VBOJobEndTime]</OutArgument>
              </p:OutArg.Arg>
            </p:OutArg>
            <p:OutArg x:Key="VBOJobLog" ArgType="string" DisplayName="VBO Job Log" Name="VBOJobLog">
              <p:OutArg.Arg>
                <OutArgument x:TypeArguments="x:String">[RunPowerShellScript_VBOJobLog]</OutArgument>
              </p:OutArg.Arg>
            </p:OutArg>
            <p:OutArg x:Key="ScriptExecutionDate" ArgType="date" DisplayName="Script Execution Date" Name="ScriptExecutionDate">
              <p:OutArg.Arg>
                <OutArgument x:TypeArguments="s:DateTime">[RunPowerShellScript_ScriptExecutionDate]</OutArgument>
              </p:OutArg.Arg>
            </p:OutArg>
            <p:OutArg x:Key="finalStatus" ArgType="number" DisplayName="Converted Final Status" Name="finalStatus">
              <p:OutArg.Arg>
                <OutArgument x:TypeArguments="x:Double">[RunPowerShellScript_finalStatus]</OutArgument>
              </p:OutArg.Arg>
            </p:OutArg>
          </p:RunPowerShellScript.OutArgs>
        </p:RunPowerShellScript>
        <p:DateDifference FirstDateNow_Item="{x:Null}" FirstDateNow_ItemProp="{x:Null}" FirstDate_Item="{x:Null}" FirstDate_ItemProp="{x:Null}" SecondDateNow_Item="{x:Null}" SecondDateNow_ItemProp="{x:Null}" SecondDate_Item="{x:Null}" SecondDate_ItemProp="{x:Null}" TimeSpanUnits_Item="{x:Null}" TimeSpanUnits_ItemProp="{x:Null}" AssemblyName="PolicyExecutionEngine, Version=2.14.0.2, Culture=neutral, PublicKeyToken=null" Difference="[DateDifference_Difference_1]" DisplayName="Date Difference - Job run time" FirstDate="[RunPowerShellScript_VBOJobEndTime]" FirstDateNow="False" FirstDateNow_DisplayArg="" FirstDate_DisplayArg="Run PowerShell Script.Last VBO Job End Time" sap:VirtualizedContainerService.HintSize="454,308" Moniker="f1842b29-00b4-4818-a1ac-9914b74b02d3" Result="[DateDifference_Result_1]" ResultString="[DateDifference_ResultString_1]" RunAsCurrentLoggedOnUser="False" ScriptExecutionMethod="None" SecondDate="[RunPowerShellScript_VBOJobStartTime]" SecondDateNow="False" SecondDateNow_DisplayArg="" SecondDate_DisplayArg="Run PowerShell Script.VBO Job Start Time" TimeSpanUnits="Minutes" TimeSpanUnits_DisplayArg="Minutes" TypeName="DateDifference" m_bTextLinkChange="False" />
        <p:DateDifference FirstDateNow_Item="{x:Null}" FirstDateNow_ItemProp="{x:Null}" FirstDate_Item="{x:Null}" FirstDate_ItemProp="{x:Null}" SecondDateNow_Item="{x:Null}" SecondDateNow_ItemProp="{x:Null}" SecondDate_Item="{x:Null}" SecondDate_ItemProp="{x:Null}" TimeSpanUnits_Item="{x:Null}" TimeSpanUnits_ItemProp="{x:Null}" AssemblyName="PolicyExecutionEngine, Version=2.14.0.2, Culture=neutral, PublicKeyToken=null" Difference="[DateDifference_Difference]" DisplayName="Date Difference - Last Job end time" FirstDate="[RunPowerShellScript_ScriptExecutionDate]" FirstDateNow="False" FirstDateNow_DisplayArg="" FirstDate_DisplayArg="Run PowerShell Script.Script Execution Date" sap:VirtualizedContainerService.HintSize="454,308" Moniker="3a5cddf3-ad25-43c4-bbd5-e101935e320e" Result="[DateDifference_Result]" ResultString="[DateDifference_ResultString]" RunAsCurrentLoggedOnUser="False" ScriptExecutionMethod="None" SecondDate="[RunPowerShellScript_VBOJobEndTime]" SecondDateNow="False" SecondDateNow_DisplayArg="" SecondDate_DisplayArg="Run PowerShell Script.Last VBO Job End Time" TimeSpanUnits="Hours" TimeSpanUnits_DisplayArg="Hours" TypeName="DateDifference" m_bTextLinkChange="False" />
        <p:DateDifference FirstDate="{x:Null}" FirstDateNow_Item="{x:Null}" FirstDateNow_ItemProp="{x:Null}" FirstDate_DisplayArg="{x:Null}" FirstDate_Item="{x:Null}" FirstDate_ItemProp="{x:Null}" SecondDateNow_Item="{x:Null}" SecondDateNow_ItemProp="{x:Null}" SecondDate_Item="{x:Null}" SecondDate_ItemProp="{x:Null}" TimeSpanUnits_Item="{x:Null}" TimeSpanUnits_ItemProp="{x:Null}" AssemblyName="PolicyExecutionEngine, Version=2.15.1.1, Culture=neutral, PublicKeyToken=null" Difference="[DateDifference_Difference_2]" DisplayName="Date Difference - Is script executing regularly?" FirstDateNow="True" FirstDateNow_DisplayArg="" sap:VirtualizedContainerService.HintSize="454,308" Moniker="6d846e83-2743-48af-b21f-05973b4c60d2" Result="[DateDifference_Result_2]" ResultString="[DateDifference_ResultString_2]" RunAsCurrentLoggedOnUser="False" ScriptExecutionMethod="None" SecondDate="[RunPowerShellScript_ScriptExecutionDate]" SecondDateNow="False" SecondDateNow_DisplayArg="" SecondDate_DisplayArg="Run PowerShell Script.Script Execution Date" TimeSpanUnits="Minutes" TimeSpanUnits_DisplayArg="Minutes" TypeName="DateDifference" m_bTextLinkChange="False" />
      </p:PolicySequence.Activities>
      <p:PolicySequence.Variables>
        <Variable x:TypeArguments="x:String" Name="RunPowerShellScript_OutPut_64" />
        <Variable x:TypeArguments="x:Double" Name="RunPowerShellScript_Result" />
        <Variable x:TypeArguments="x:String" Name="RunPowerShellScript_ResultString" />
        <Variable x:TypeArguments="scg:IEnumerable(x:Object)" Name="RunPowerShellScript_Results_x64" />
        <Variable x:TypeArguments="x:String" Name="RunPowerShellScript_lastVBOJobStatus" />
        <Variable x:TypeArguments="x:String" Name="RunPowerShellScript_VBOJobName" />
        <Variable x:TypeArguments="x:String" Name="RunPowerShellScript_VBOJobLog" />
        <Variable x:TypeArguments="x:Double" Name="DateDifference_Difference" />
        <Variable x:TypeArguments="x:String" Name="DateDifference_ResultString" />
        <Variable x:TypeArguments="x:Double" Name="DateDifference_Result" />
        <Variable x:TypeArguments="s:DateTime" Name="RunPowerShellScript_VBOJobStartTime" />
        <Variable x:TypeArguments="s:DateTime" Name="RunPowerShellScript_VBOJobEndTime" />
        <Variable x:TypeArguments="x:Double" Name="DateDifference_Difference_1" />
        <Variable x:TypeArguments="x:String" Name="DateDifference_ResultString_1" />
        <Variable x:TypeArguments="x:Double" Name="DateDifference_Result_1" />
        <Variable x:TypeArguments="x:Double" Name="DateDifference_Difference_2" />
        <Variable x:TypeArguments="x:Double" Name="DateDifference_Result_2" />
        <Variable x:TypeArguments="x:String" Name="DateDifference_ResultString_2" />
        <Variable x:TypeArguments="s:DateTime" Name="RunPowerShellScript_ScriptExecutionDate" />
        <Variable x:TypeArguments="x:Double" Name="RunPowerShellScript_finalStatus" />
      </p:PolicySequence.Variables>
    </p:PolicySequence>
  </Activity>
</Policy>
```

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

# SCRIPT