diff --git a/windows/scripts/disable-password-complexity.ps1 b/windows/scripts/disable-password-complexity.ps1 new file mode 100644 index 0000000..c631241 --- /dev/null +++ b/windows/scripts/disable-password-complexity.ps1 @@ -0,0 +1,6 @@ +secedit /export /cfg c:\new.cfg #carriage return +#start-sleep -s 5 #carriage return +((get-content c:\new.cfg) -replace ('PasswordComplexity = 1', 'PasswordComplexity = 0')) | Out-File c:\new.cfg #carriage return +secedit /configure /db $env:windir\security\new.sdb /cfg c:\new.cfg /areas SECURITYPOLICY #carriage return +Rename-Item c:\new.cfg c:\new.cfg.txt #carriage return +rm c:\new.cfg.txt diff --git a/windows/windows-2019.json b/windows/windows-2019.json index 3c3a3fe..343cb40 100644 --- a/windows/windows-2019.json +++ b/windows/windows-2019.json @@ -67,7 +67,8 @@ "provisioners": [ { "scripts": [ - "windows/scripts/debloat-windows.ps1" + "windows/scripts/debloat-windows.ps1", + "windows/scripts/disable-password-complexity.ps1" ], "type": "powershell" }, diff --git a/windows/windows-2022.json b/windows/windows-2022.json index 1172bad..695a0f9 100644 --- a/windows/windows-2022.json +++ b/windows/windows-2022.json @@ -68,7 +68,8 @@ "provisioners": [ { "scripts": [ - "windows/scripts/debloat-windows.ps1" + "windows/scripts/debloat-windows.ps1", + "windows/scripts/disable-password-complexity.ps1" ], "type": "powershell" },