This script will set the local password policy for windows such as Password Length , Unique Password History, Minimum & Maximum no. days for Password Expiry and Password Complexity.
Password_History='5' #Provide the no. of unique passwords to remember
Minimum_Password_Age='4' #Provide the minimum no. of days for password expiry
Maximum_Password_Age='10'#Provide the maximum no. of days for password expiry
Minimum_Password_Length='3'#Provide the minimum length of password
Password_Meet_Complexity='1'#Provide the password meet complexity to be enabled(1) or disabled(0)
Run as System User