From 35cafdacef4e0476c32367138ee08eeb809f45e5 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 29 Jun 2023 02:57:10 +0200 Subject: [PATCH] Forcefully shut down computer --- scripts/Windows/OS/User.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Windows/OS/User.ps1 b/scripts/Windows/OS/User.ps1 index be9c974d..635c1080 100644 --- a/scripts/Windows/OS/User.ps1 +++ b/scripts/Windows/OS/User.ps1 @@ -97,7 +97,7 @@ function Enable-UACNextLogin([Context] $context) { "`$context = [Context]::new();", "`$context.EntryPoint = '$($context.EntryPoint)';", "`$context.RegisterReboot((Get-Item 'Registry::HKEY_USERS\$((Get-LocalUser $context.UserName).SID)'));", - "Restart-Computer;"))); + "Restart-Computer -Force;"))); $trigger = New-ScheduledTaskTrigger -AtLogOn; $principal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -RunLevel Highest;