Disable users by default

This commit is contained in:
Manuel Thalmann 2024-08-09 02:58:01 +02:00
parent 32784742c6
commit 728839c213

View file

@ -97,7 +97,7 @@ $null = New-Module {
$userArguments.fullName = $displayName; $userArguments.fullName = $displayName;
} }
New-LocalUser -NoPassword @userArguments; New-LocalUser -Disabled -NoPassword @userArguments;
Set-LocalUser $name -PasswordNeverExpires $true; Set-LocalUser $name -PasswordNeverExpires $true;
Set-LocalUser $name -PasswordNeverExpires $false; Set-LocalUser $name -PasswordNeverExpires $false;
} }