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

# Disable Sleep and Hibernation

```powershell Automation Policy
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Policy ID="9dffc326-229d-4366-8b3c-1ca0811e6b7a" Name="Disable sleep and Hibernation" Description="ZGlzYWJsZXMgc2xlZXBzIGFuZCBoaWJlcm5hdGlvbiBpZiB0aGUgY29tcHV0ZXIgaXMgcGx1Z2dlZCBpbg==" Version="2.10.0.19" RemoteCategory="0" ExecutionType="CurrentLoggedOnUser" MinimumPSVersionRequired="0.0.0">
  <Object ID="{5dcc8410-2221-4c50-bb67-e7c08f17e7ca}" Type="{B6FA6D8B-EEAA-47A6-8463-7F9A4F5BBB6E}" Data="&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" />
  </LinkManager>
  <Diagnostics OriginalVersion="2.18.3.1" />
  <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:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <x:Members>
      <x:Property Name="PolicyGUID" Type="InArgument(x:String)" />
    </x:Members>
    <sap:VirtualizedContainerService.HintSize>449,935</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="449,935" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
      <p:PolicySequence.Activities>
        <p:RunProgram Arguments_ItemProp="{x:Null}" Program_ItemProp="{x:Null}" RunAsType_Item="{x:Null}" RunAsType_ItemProp="{x:Null}" WaitForCompletion_ItemProp="{x:Null}" WindowType_ItemProp="{x:Null}" WorkingDirectory_DisplayArg="{x:Null}" WorkingDirectory_ItemProp="{x:Null}" Arguments="-x -standby-timeout-ac 0" Arguments_DisplayArg="-x -standby-timeout-ac 0" Arguments_Item="{x:Null}" AssemblyName="PolicyExecutionEngine, Version=2.18.3.1, Culture=neutral, PublicKeyToken=null" DisplayName="Run Program" sap:VirtualizedContainerService.HintSize="413,336" Moniker="43f02b5c-94b1-4592-b950-f234fda9a00a" ProcessID="[RunProgram_ProcessID_1]" Program="C:\Windows\System32\powercfg.exe" Program_DisplayArg="C:\Windows\System32\powercfg.exe" Program_Item="{x:Null}" Result="[RunProgram_Result_1]" ResultString="[RunProgram_ResultString_1]" RunAsCurrentLoggedOnUser="True" RunAsType="LocalSystem" RunAsType_DisplayArg="Designer" ScriptExecutionMethod="None" TypeName="RunProgram" WaitForCompletion="True" WaitForCompletion_DisplayArg="" WaitForCompletion_Item="{x:Null}" WindowType="Normal" WindowType_DisplayArg="Normal" WindowType_Item="{x:Null}" WorkingDirectory="{x:Null}" WorkingDirectory_Item="{x:Null}" m_bTextLinkChange="False" />
        <p:RunProgram Arguments_ItemProp="{x:Null}" Program_ItemProp="{x:Null}" RunAsType_Item="{x:Null}" RunAsType_ItemProp="{x:Null}" WaitForCompletion_ItemProp="{x:Null}" WindowType_ItemProp="{x:Null}" WorkingDirectory_DisplayArg="{x:Null}" WorkingDirectory_ItemProp="{x:Null}" Arguments="-x -hibernate-timeout-ac 0" Arguments_DisplayArg="-x -hibernate-timeout-ac 0" Arguments_Item="{x:Null}" AssemblyName="PolicyExecutionEngine, Version=2.18.3.1, Culture=neutral, PublicKeyToken=null" DisplayName="Run Program" sap:VirtualizedContainerService.HintSize="413,336" Moniker="dd41ec73-7b20-4f4c-9f75-7ad3ee67418f" ProcessID="[RunProgram_ProcessID]" Program="C:\Windows\System32\powercfg.exe" Program_DisplayArg="C:\Windows\System32\powercfg.exe" Program_Item="{x:Null}" Result="[RunProgram_Result]" ResultString="[RunProgram_ResultString]" RunAsCurrentLoggedOnUser="True" RunAsType="LocalSystem" RunAsType_DisplayArg="Designer" ScriptExecutionMethod="None" TypeName="RunProgram" WaitForCompletion="True" WaitForCompletion_DisplayArg="" WaitForCompletion_Item="{x:Null}" WindowType="Normal" WindowType_DisplayArg="Normal" WindowType_Item="{x:Null}" WorkingDirectory="{x:Null}" WorkingDirectory_Item="{x:Null}" m_bTextLinkChange="False" />
      </p:PolicySequence.Activities>
      <p:PolicySequence.Variables>
        <Variable x:TypeArguments="x:String" Name="RunProgram_ProcessID" />
        <Variable x:TypeArguments="x:Double" Name="RunProgram_Result" />
        <Variable x:TypeArguments="x:String" Name="RunProgram_ResultString" />
        <Variable x:TypeArguments="x:String" Name="RunProgram_ProcessID_1" />
        <Variable x:TypeArguments="x:Double" Name="RunProgram_Result_1" />
        <Variable x:TypeArguments="x:String" Name="RunProgram_ResultString_1" />
      </p:PolicySequence.Variables>
    </p:PolicySequence>
  </Activity>
</Policy>
```

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

# SCRIPT