Remove unnecessary policy change

This commit is contained in:
Manuel Thalmann 2024-09-03 16:31:12 +02:00
parent 2b73da1f64
commit 2cb9afaf5a
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; $env:CONFIG_MODULE = Resolve-Path $env:CONFIG_MODULE;
} }
if (Test-Admin) {
Disable-WindowsUpdateAutoRestart;
}
New-Alias -Force "sudo" gsudo; New-Alias -Force "sudo" gsudo;
} }

View file

@ -56,19 +56,6 @@ $null = New-Module {
Set-BootMessage; 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 .SYNOPSIS
Resets the automatic reboot state. Resets the automatic reboot state.