Disable users by default

This commit is contained in:
Manuel Thalmann 2024-08-09 02:58:01 +02:00
parent 62af6e393c
commit c631882854

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;
} }