User Tools

Site Tools


adsetup:options:defaultpassword

Checking this option will update the GptTmpl.inf1) file in the Default Domain Policy to the following settings.

Name Value
MinimumPasswordAge 0
MaximumPasswordAge 90
MinimumPasswordLength 8
PasswordHistorySize 10

### Update Password Policy 
If ($DefaultPassword -eq $True) {
    WriteLog "Updating the following settings in the $([char]0x2192) Default Domain Policy" "Info"
    WriteLog "----- MinimumPasswordAge $([char]0x2192) 0" "Info"
    WriteLog "----- MaximumPasswordAge $([char]0x2192) 90" "Info"
    WriteLog "----- MinimumPasswordLength $([char]0x2192) 6" "Info"
    WriteLog "----- PasswordHistorySize $([char]0x2192) 10" "Info"
    WriteLog $Line "LINE"
    $DDGPTFile = "$PoliciesRootPath\{$DefaultDomainPolicyID}\MACHINE\Microsoft\Windows NT\SecEdit\GptTmpl.inf"
    Update_Text $DDGPTFile "MinimumPasswordAge = 1" "MinimumPasswordAge = 0"
    Update_Text $DDGPTFile "MaximumPasswordAge = 42" "MaximumPasswordAge = 90"
    Update_Text $DDGPTFile "MinimumPasswordLength = 7" "MinimumPasswordLength = 8"
    Update_Text $DDGPTFile "PasswordHistorySize = 24" "PasswordHistorySize = 10"
    }
1)
Location of this file is in the policies directory on the SYSVOL, under MACHINE → Microsoft → Windows NT → SecEdit
adsetup/options/defaultpassword.txt · Last modified: 2017/03/31 18:31 by rob