win_security_policy - add warning when using this module ot edit rights (#48850)
This commit is contained in:
parent
7692882db3
commit
9b0dd5224b
3 changed files with 8 additions and 0 deletions
2
changelogs/fragments/win_security_policy-rights.yaml
Normal file
2
changelogs/fragments/win_security_policy-rights.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- win_security_policy - warn users to use win_user_right instead when editing ``Privilege Rights``
|
|
@ -134,6 +134,10 @@ Function ConvertFrom-Ini($file_path) {
|
|||
return $ini
|
||||
}
|
||||
|
||||
if ($section -eq "Privilege Rights") {
|
||||
Add-Warning -obj $result -message "Using this module to edit rights and privileges is error-prone, use the win_user_right module instead"
|
||||
}
|
||||
|
||||
$will_change = $false
|
||||
$secedit_ini = Export-SecEdit
|
||||
if (-not ($secedit_ini.ContainsKey($section))) {
|
||||
|
|
|
@ -36,6 +36,8 @@ options:
|
|||
- Example sections to use are 'Account Policies', 'Local Policies',
|
||||
'Event Log', 'Restricted Groups', 'System Services', 'Registry' and
|
||||
'File System'
|
||||
- If wanting to edit the C(Privilege Rights) section, use the
|
||||
M(win_user_right) module instead.
|
||||
required: yes
|
||||
key:
|
||||
description:
|
||||
|
|
Loading…
Reference in a new issue