<!--- Verify first that your feature was not already discussed on GitHub -->
<!--- Complete *all* sections as described, this form is processed automatically -->

##### SUMMARY
A [Group Managed Service Account or gMSA](https://techcommunity.microsoft.com/t5/Core-Infrastructure-and-Security/Windows-Server-2012-Group-Managed-Service-Accounts/ba-p/255910) is a special type of service account in Active Directory that has its password managed automatically and can be used across multiple servers. The password is not known to administrators, and services, applications, and scheduled tasks that run as this account are able to automatically retrieve the password for the account.

Scheduled Tasks can run as gMSA, by setting a `logon_type` of `password` without actually supplying a password.

The `win_scheduled_task` module enforces that a password is supplied when the logon type is `password`, but the code otherwise would work as is.

##### ISSUE TYPE
- Feature Idea

##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
win_scheduled_task

##### ADDITIONAL INFORMATION
<!--- Describe how the feature would be used, why it is needed and what it would solve -->

<!--- Paste example playbooks or commands between quotes below -->
```yaml
- name: Task with gMSA
  win_scheduled_task:
    name: TaskName2
    username: DOMAIN\gMsaSvcAcct$
    logon_type: password
```

<!--- HINT: You can also paste gist.github.com links for larger files -->

- In Ansible 2.4 and earlier, this could only be run on Server 2012/Windows 8
  or newer. Since Ansible 2.5 this restriction has been lifted.
- The option names and structure for actions and triggers of a service follow
  the C(RegisteredTask) naming standard and requirements, it would be useful to
  read up on this guide if coming across any issues U(https://msdn.microsoft.com/en-us/library/windows/desktop/aa382542.aspx).
seealso:
- module: win_scheduled_task_stat
author:
- Peter Mounce (@petemounce)
- Jordan Borean (@jborean93)
'''
EXAMPLES = r'''
- name: Create a task to open 2 command prompts as SYSTEM
  win_scheduled_task:
    name: TaskName
    description: open command prompt
    actions:
    - path: cmd.exe
      arguments: /c hostname
    - path: cmd.exe
      arguments: /c whoami
    triggers:
    - type: daily
      start_boundary: '2017-10-09T09:00:00'
    username: SYSTEM
    state: present
    enabled: yes
- name: Create task to run a PS script as NETWORK service on boot
  win_scheduled_task:
    name: TaskName2