Last active
August 29, 2015 14:15
-
-
Save ducke/dc4241e91fdfeafd816c to your computer and use it in GitHub Desktop.
disable password complexity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -Version 3.0 | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
.replace requires Powershell Version 3