Consider the following code:
$params = @{
Name = 'testUser1'
Password = (ConvertTo-SecureString '3' -AsPlainText -Force)
ErrorAction = 'Stop'
}
New-LocalUser @params
When the "Local Security Policy" for the password complexity is enabled the code above should fail. This seems to be the case but the user account is still created. Is this a bug in Windows?