📜  powershell 禁用密码复杂性 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:31.799000             🧑  作者: Mango

代码示例1
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 /areas SECURITYPOLICY
rm -force c:\secpol.cfg -confirm:$false