From fcc02320eaf2730e7e0fcef69ce57b1f2e131773 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Wed, 28 Jun 2023 22:36:40 +0200 Subject: [PATCH] Disable local admin during setup --- 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 e3031d21..7bad461b 100644 --- a/scripts/Windows/OS/User.ps1 +++ b/scripts/Windows/OS/User.ps1 @@ -32,7 +32,7 @@ function New-PersonalUser([Context] $context) Write-Information "Renaming the new User to $($context.UserName)"; Rename-LocalUser $user $context.UserName; - Add-LocalGroupMember -Group "Administrators" -Member $user && Set-LocalUser $context.AdminName -Password (ConvertTo-SecureString -AsPlainText "Admin"); + Add-LocalGroupMember -Group "Administrators" -Member $user && Set-LocalUser $context.AdminName -Password (ConvertTo-SecureString -AsPlainText "Admin") && Disable-LocalUser $context.AdminName; Write-Host "Registering setup script for all new users"; $context.RegisterNewUserReboot();