Manage Local Policy on Windows
New in version 2016.11.0.
This module allows configuring local group policy (i.e. gpedit.msc) on a Windows server.
Administrative template policies are dynamically read from admx/adml files on the server.
Policies contained in the "Windows Settings" section of the gpedit.msc gui are statically defined in this module. Each policy is configured for the section (Machine/User) in the module's _policy_info class. The _policy_info class contains a policies dict on how the module will configure the policy, where the policy resides in the gui (for display purposes), data validation data, data transformation data, etc.
At this time, start/shutdown scripts policies are displayed, but are not configurable.
Not all "Security Settings" policies exist in the _policy_info class
depends: |
|
---|
salt.modules.win_lgpo.
get
(policy_class=None, return_full_policy_names=True, hierarchical_return=False, adml_language='en-US', return_not_configured=False)¶Get a policy value
Parameters: |
|
---|---|
Return type: |
CLI Example:
salt '*' lgpo.get return_full_policy_names=True
salt.modules.win_lgpo.
get_policy_info
(policy_name, policy_class, adml_language='en-US')¶returns information about a specified policy
Str: | policy_name the name of the policy to lookup |
---|---|
Str: | policy_class the class of policy, i.e. machine, user, both |
Str: | adml_language the adml language to use for Administrative Template data lookup |
salt.modules.win_lgpo.
list_configurable_policies
(policy_class='Machine', include_administrative_templates=True, adml_language='en-US')¶list the policies that the execution module can configure
salt.modules.win_lgpo.
set
(computer_policy=None, user_policy=None, cumulative_rights_assignments=True, adml_language='en-US')¶Set a local server policy.
Parameters: |
|
---|---|
Return type: |
CLI Example:
salt '*' lgpo.set computer_policy="{'LockoutDuration': 2, 'RestrictAnonymous': 'Enabled', 'AuditProcessTracking': 'Succes, Failure'}"
salt.modules.win_lgpo.
set_computer_policy
(name, setting, cumulative_rights_assignments=True, adml_language='en-US')¶Set a single computer policy
Determine how user rights assignment policies are configured.
If True, user right assignment specifications are simply added to the existing policy If False, only the users specified will get the right (any existing will have the right revoked)
Parameters: | adml_language (str) -- The language files to use for looking up Administrative Template policy data (i.e. how the policy is displayed in the GUI). Defaults to 'en-US' (U.S. English). |
---|
salt '*' lgpo.set_computer_policy LockoutDuration 1440
salt.modules.win_lgpo.
set_user_policy
(name, setting, adml_language='en-US')¶Set a single user policy
Parameters: | adml_language (str) -- The language files to use for looking up Administrative Template policy data (i.e. how the policy is displayed in the GUI). Defaults to 'en-US' (U.S. English). |
---|
salt '*' lgpo.set_user_policy "Control Panel\Display\Disable the Display Control Panel" Enabled
Docs for previous releases are available on readthedocs.org.
Latest Salt release: 2016.11.1