Prevent future auto logins
This commit is contained in:
parent
2365d3320c
commit
686251b0f7
2 changed files with 2 additions and 1 deletions
|
@ -18,6 +18,6 @@ function New-PersonalUser([Context] $context)
|
|||
|
||||
$user = Get-LocalUser | Select-Object { -not ($users -contains $_.Name) } | Select-Object -Last;
|
||||
Rename-LocalUser $user $context.UserName;
|
||||
Add-LocalGroupMember -Group "Administrators" -Member $user;
|
||||
Add-LocalGroupMember -Group "Administrators" -Member $user && Set-LocalUser $context.AdminName -Password (ConvertTo-SecureString "Admin");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ class Context {
|
|||
[string]$RootDir;
|
||||
[string]$BackupName;
|
||||
[string]$UserName;
|
||||
[string]$AdminName = "Admin";
|
||||
[string] BackupRoot() {
|
||||
if (-not $this.RootDir)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue