win_security_policy - add warning when using this module ot edit rights (#48850)

(cherry picked from commit 9b0dd5224b)
pull/49013/head
Jordan Borean 7 years ago committed by Toshio Kuratomi
parent d391e19fa3
commit 845776ed6a

@ -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…
Cancel
Save