Search Results
byago
byago
byago
byago
byago
This script fixes the windows CIS Benchmark check 1.1.3: "Ensure 'Minimum password age' is set to '1 or more day(s)'."
The script first checks if it is running with administrative privileges. It then attempts to set the minimum password age using the net accounts command. After setting, it verifies the change by parsing the output of net accounts and checks if the age is 1 or more days. This addresses the CIS check for 'Minimum password age'.
MinPasswordAgeDays Optional parameter to specify the minimum password age in days. Must be an integer greater than or equal to 1. Defaults to 1.
.\Set-MinPasswordAge.ps1Sets and verifies the minimum password age to 1 day..\Set-MinPasswordAge.ps1 -MinPasswordAgeDays 5Sets and verifies the minimum password age to 5 days.