Prevent sleep mode for all actions

This commit is contained in:
Manuel Thalmann 2023-07-29 03:37:43 +02:00
parent 9c02d8913f
commit e3e998a4a4
2 changed files with 2 additions and 1 deletions

View file

@ -14,7 +14,6 @@ function Invoke-WindowsInstallation([Context] $context)
$null = Enable-WindowsOptionalFeature -Online -All -FeatureName "NetFx3";
$context.PreventSleepMode();
. "$configPath/Windows/Install.ps1" $context;
. "$configPath/Explorer/Install.ps1" $context;
. "$configPath/OpenSSH/Install.ps1" $context;

View file

@ -1,7 +1,9 @@
#!/bin/pwsh
. "$PSScriptRoot/Context.ps1";
$Global:InformationPreference = "Continue";
$Global:ErrorActionPreference = "Inquire";
[Context]::new().PreventSleepMode();
$null = powershell -c Get-PackageProvider -ListAvailable NuGet;
if (-not $?) {