Add Local Security Policy update example (#60897)
* Add Local Security Policy update example ##### SUMMARY This real world example will be useful, but perhaps there is a better section? ##### ISSUE TYPE - Docs Pull Request +label: docsite_pr * Move new example and add not to username
This commit is contained in:
parent
b93d92ef9a
commit
9c5a1ebba5
1 changed files with 11 additions and 0 deletions
|
@ -260,6 +260,8 @@ options:
|
||||||
- The user to run the scheduled task as.
|
- The user to run the scheduled task as.
|
||||||
- Will default to the current user under an interactive token if not
|
- Will default to the current user under an interactive token if not
|
||||||
specified during creation.
|
specified during creation.
|
||||||
|
- The user account specified must have the C(SeBatchLogonRight) logon right
|
||||||
|
which can be added with M(win_user_right).
|
||||||
type: str
|
type: str
|
||||||
aliases: [ user ]
|
aliases: [ user ]
|
||||||
password:
|
password:
|
||||||
|
@ -435,6 +437,7 @@ notes:
|
||||||
see U(https://techcommunity.microsoft.com/t5/Core-Infrastructure-and-Security/Windows-Server-2012-Group-Managed-Service-Accounts/ba-p/255910)
|
see U(https://techcommunity.microsoft.com/t5/Core-Infrastructure-and-Security/Windows-Server-2012-Group-Managed-Service-Accounts/ba-p/255910)
|
||||||
seealso:
|
seealso:
|
||||||
- module: win_scheduled_task_stat
|
- module: win_scheduled_task_stat
|
||||||
|
- module: win_user_right
|
||||||
author:
|
author:
|
||||||
- Peter Mounce (@petemounce)
|
- Peter Mounce (@petemounce)
|
||||||
- Jordan Borean (@jborean93)
|
- Jordan Borean (@jborean93)
|
||||||
|
@ -470,6 +473,14 @@ EXAMPLES = r'''
|
||||||
run_level: highest
|
run_level: highest
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
- name: Update Local Security Policy to allow users to run scheduled tasks
|
||||||
|
win_user_right:
|
||||||
|
name: SeBatchLogonRight
|
||||||
|
users:
|
||||||
|
- LocalUser
|
||||||
|
- DOMAIN\NetworkUser
|
||||||
|
action: add
|
||||||
|
|
||||||
- name: Change above task to run under a domain user account, storing the passwords
|
- name: Change above task to run under a domain user account, storing the passwords
|
||||||
win_scheduled_task:
|
win_scheduled_task:
|
||||||
name: TaskName2
|
name: TaskName2
|
||||||
|
|
Loading…
Reference in a new issue