
Following batch script set user password policy and ask for your input to set it.
Tips: see net account help for more.
:: Script Starts here
@echo off
title ### Modify Password Policy ###
echo.
echo --------------------------------------
echo ...Showing Current Password Policy...
echo --------------------------------------
echo.
net accounts
pause
cls
echo.
echo ---------------------------------------------------------
echo ...Modify Password Policy, OR Just Press Enter to Skip...
echo ---------------------------------------------------------
echo.
set /p minpwage=Type Minimum Password Age :
set /p maxpwage=Type Maximum Password Age :
set /p minpwlen=Type Minimum Password Length :
set /p uniquepw=Type Number of Password History :
echo.
net accounts /minpwage:%minpwage% /maxpwage:%maxpwage% /minpwlen:%minpwlen% /uniquepw:%uniquepw%
cls
echo.
echo -----------------------------
echo ...Updated Password Policy...
echo -----------------------------
echo.
net accounts
pause
:: Script Ends Here





