Manage Local Policy on Windows
This module allows configuring local group policy (i.e. gpedit.msc
) on a
Windows server.
New in version 2016.11.0.
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.
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: |
|
---|---|
Returns: | A dictionary containing the policy values for the specified class |
Return type: |
CLI Example:
salt '*' lgpo.get machine 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
Parameters: | |
---|---|
Returns: | Information about the specified policy |
Return type: |
CLI Example:
salt '*' lgpo.get_policy_info 'Maximum password age' machine
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: |
|
---|---|
Returns: | True is successful, otherwise False |
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
Parameters: |
|
---|---|
Returns: | True if successful, otherwise False |
Return type: |
CLI Example:
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: | |
---|---|
Returns: | True if successful, Otherwise False |
Return type: |
CLI Example:
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: 2017.7.2