Lead user through the setup properly
This commit is contained in:
parent
6d02e1bcb9
commit
60f090349c
2 changed files with 6 additions and 0 deletions
|
@ -31,6 +31,9 @@ function New-PersonalUser([Context] $context, [string] $userName)
|
||||||
if (-not (Get-LocalUser $userName -ErrorAction SilentlyContinue)) {
|
if (-not (Get-LocalUser $userName -ErrorAction SilentlyContinue)) {
|
||||||
Write-Host "Creating Personal User ``$userName``";
|
Write-Host "Creating Personal User ``$userName``";
|
||||||
|
|
||||||
|
Get-LocalUser | Where-Object { $_.Name -in $context.UserNames } |
|
||||||
|
Disable-LocalUser;
|
||||||
|
|
||||||
while ($true) {
|
while ($true) {
|
||||||
Write-Host (
|
Write-Host (
|
||||||
[string]::Join(
|
[string]::Join(
|
||||||
|
|
|
@ -25,5 +25,8 @@ function Install-PersonalUsers([Context] $context) {
|
||||||
if ($userID -ge 0) {
|
if ($userID -ge 0) {
|
||||||
New-PersonalUser $context $($context.UserNames[$userID]);
|
New-PersonalUser $context $($context.UserNames[$userID]);
|
||||||
Set-UserID ($userID - 1);
|
Set-UserID ($userID - 1);
|
||||||
|
} else {
|
||||||
|
Get-LocalUser | Where-Object { $_.Name -in $context.UserNames } |
|
||||||
|
Enable-LocalUser;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue