Exclude the Guest
user
This commit is contained in:
parent
706b78d9cf
commit
1eb8875757
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue