This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Start-Sleep -Seconds 4800; Add-Type -TypeDefinition @" | |
| using System; | |
| using System.Runtime.InteropServices; | |
| public class PInvoke { | |
| [DllImport("powrprof.dll", SetLastError = true)] | |
| public static extern bool SetSuspendState(bool hibernate, bool forceCritical, bool disableWakeEvent); | |
| } | |
| "@; [PInvoke]::SetSuspendState($false, $false, $false) |