From 1eb88757578e1c061ffecfc22dad01c283a4767c Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Fri, 23 Jun 2023 02:34:53 +0200 Subject: [PATCH] Exclude the `Guest` user --- scripts/Windows/OS/User.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/Windows/OS/User.ps1 b/scripts/Windows/OS/User.ps1 index 053cda3e..384c4076 100644 --- a/scripts/Windows/OS/User.ps1 +++ b/scripts/Windows/OS/User.ps1 @@ -15,7 +15,9 @@ function New-PersonalUser([Context] $context) "So sorry...")); $users = Get-LocalUser | Select-Object { $_.Name }; - $users += @("WDAGUtilityAccount"); + Write-Host "Following users exist already:" + Write-Host $users; + $users += @("WDAGUtilityAccount", "User"); Read-Host "Please hit enter once you're done..."; $user = Get-LocalUser | Where-Object { -not ($users -contains $_.Name) } | Select-Object -Last 1;