Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Relax_minimum_password_length_limits, Minimum_Password_Length and… #185

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function Set-TargetResource
$Minimum_Password_Age,

[Parameter()]
[ValidateRange(0, 14)]
[ValidateRange(0, 30)]
[System.UInt32]
$Minimum_Password_Length,

Expand Down Expand Up @@ -153,6 +153,7 @@ function Set-TargetResource
[ValidateRange(0, 99999)]
[System.UInt32]
$Maximum_tolerance_for_computer_clock_synchronization

)

$kerberosPolicies = @()
Expand Down
16 changes: 14 additions & 2 deletions source/DSCResources/MSFT_SecurityOption/MSFT_SecurityOption.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -571,9 +571,21 @@ function Set-TargetResource
[System.String]
$User_Account_Control_Switch_to_the_secure_desktop_when_prompting_for_elevation,

[Parameter()][ValidateSet("Enabled", "Disabled")]
[Parameter()]
[ValidateSet("Enabled", "Disabled")]
[System.String]
$User_Account_Control_Virtualize_file_and_registry_write_failures_to_per_user_locations
$User_Account_Control_Virtualize_file_and_registry_write_failures_to_per_user_locations,

[Parameter()]
[ValidateRange(0, 50)]
[System.String]
$Minimum_length_password_audit,

[Parameter()]
[ValidateSet("Enabled", "Disabled")]
[System.String]
$Relax_minimum_password_length_limits

)

$registryPolicies = @()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,7 @@ class MSFT_SecurityOption : OMI_BaseResource
[Write, Description("Determines the behavior of all User Account Control (UAC) policies for the entire system"), ValueMap{"Enabled","Disabled"}, Values{"Enabled","Disabled"}] String User_Account_Control_Run_all_administrators_in_Admin_Approval_Mode;
[Write, Description("Determines whether the elevation request prompts on the interactive user desktop or on the secure desktop"), ValueMap{"Enabled","Disabled"}, Values{"Enabled","Disabled"}] String User_Account_Control_Switch_to_the_secure_desktop_when_prompting_for_elevation;
[Write, Description("Enables or disables the redirection of the write failures of earlier applications to defined locations in the registry and the file system"), ValueMap{"Enabled","Disabled"}, Values{"Enabled","Disabled"}] String User_Account_Control_Virtualize_file_and_registry_write_failures_to_per_user_locations;
[Write, Description("This security setting determines the minimum password length for which password length audit warning events are issued. This setting may be configured from 1 to 50.")] String Minimum_length_password_audit;
[Write, Description("This setting controls whether the minimum password length setting can be increased beyond the legacy limit of 14."), ValueMap{"Enabled","Disabled"}, Values{"Enabled","Disabled"}] String Relax_minimum_password_length_limits;

};
18 changes: 18 additions & 0 deletions source/DSCResources/MSFT_SecurityOption/SecurityOptionData.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -875,4 +875,22 @@
Disabled = '4,0'
}
}

"Minimum_length_password_audit" = @{
Value = "MACHINE\System\CurrentControlSet\Control\SAM\MinimumPasswordLengthAudit"
Section = 'Registry Values'
Option = @{
String = '4,' # + <Length
}
}

"Relax_minimum_password_length_limits" = @{
Value = "MACHINE\System\CurrentControlSet\Control\SAM\RelaxMinimumPasswordLengthLimits"
Section = 'Registry Values'
Option = @{
Enabled = '4,1'
Disabled = '4,0'
}
}

}