Ignore automated accounts

This commit is contained in:
Manuel Thalmann 2023-06-23 01:51:29 +02:00
parent 88179df651
commit 706b78d9cf

View file

@ -15,6 +15,7 @@ function New-PersonalUser([Context] $context)
"So sorry..."));
$users = Get-LocalUser | Select-Object { $_.Name };
$users += @("WDAGUtilityAccount");
Read-Host "Please hit enter once you're done...";
$user = Get-LocalUser | Where-Object { -not ($users -contains $_.Name) } | Select-Object -Last 1;