Modify Local Security Policy using Powershell -
I use Windows Server 2012.
I can:
In the Administrative Tools folder, double click the Local Security Policy icon, expand the account policies and click on the password policy
Double click in the right pane Password must meet compliance requirements and it must be set to disabled. Click OK to save changes to your policy.
How can I program it using PowerShell?
According to Kayasax there is no absolute power to do this; must wrap.
secedit / export / cfg c: \ secpol.cfg (gc C: \ secpol.cfg) .replace ("PasswordComplexity = 1", "PasswordComplexity = 0"). Out-File C: \ secpol.cfg secedit / configure / db c: \ windows \ security \ local.sdb / cfg c: \ secpol.cfg / area security rm -force c: \ secpol.cfg -confirm: $ false < / Code>
Comments
Post a Comment