Remove unnecessary policy change

This commit is contained in:
Manuel Thalmann 2024-09-03 16:31:12 +02:00
parent e4dc0ef2ec
commit 71e46db226
2 changed files with 0 additions and 17 deletions

View file

@ -57,10 +57,6 @@ $null = New-Module {
$env:CONFIG_MODULE = Resolve-Path $env:CONFIG_MODULE;
}
if (Test-Admin) {
Disable-WindowsUpdateAutoRestart;
}
New-Alias -Force "sudo" gsudo;
}

View file

@ -56,19 +56,6 @@ $null = New-Module {
Set-BootMessage;
}
<#
.SYNOPSIS
Disables automatic reboots by Windows Update.
#>
function Disable-WindowsUpdateAutoRestart {
$path = "$wuPolicyPath\AU";
$null = New-Item -Force $path -ErrorAction SilentlyContinue;
Set-ItemProperty $path `
-Name NoAutoRebootWithLoggedOnUsers `
-Value 1;
}
<#
.SYNOPSIS
Resets the automatic reboot state.