Windows Server Windows Server: Group

Summary

This module contains actions for viewing & managing local groups on a Windows Server.

Actions

windows_server.groups.

display

Display groups in a table.

The table will have the following columns:

  • Name
  • Description

Minimum Plugin Version: 3.0.0

Input
  • text: the title of the table

  • groups: any number of Groups

Output

Nothing is outputted by this action.

Example
1
2
3
4
5
6
7
8
9
- windows_server.groups.get_all:
  load:
    windows_server: windows_server
  save: groups

- windows_server.groups.display:
    text: Local Groups
  load:
    groups: groups

windows_server.groups.

display_tabbed

Display groups in a table with multiple tabs.

This action can be used to display group lists from multiple servers.

The table will have the following columns:

  • Name
  • Description

Minimum Plugin Version: 3.0.0

Input
  • text: the title of the table

  • tabs: a dictionary where each key is a tab name & each value is any number of Groups

Output

Nothing is outputted by this action.

Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
- set:
    name: tabs
    value: {}

- windows_server.groups.get_all:
  load:
    windows_server: windows_server
  save: all_groups

- ppa_tools.dictionaries.insert:
    name: My Server
  load:
    value: all_groups
    dictionary: tabs
  save: tabs

- windows_server.groups.display_tabbed:
    text: All Local Groups
  load:
    tabs: tabbed_table

windows_server.groups.

get_all

Get all local groups from a Windows Server.

Minimum Plugin Version: 2.0.0

Domain Controllers

Running this action against a Domain Controller will return an empty list.

Input
Output

A list of Group dictionaries.

Example
1
2
3
4
- windows_server.groups.get_all:
  load:
    windows_server: windows_server
  save: all_groups

windows_server.groups.

get_users

Get all local users from a local group on a Windows Server.

Minimum Plugin Version: 2.0.0

Domain Controllers

Running this action against a Domain Controller will return an empty list.

Performance

This action uses WMI to get group members in an effort to avoid this bug.

It may take a few seconds on servers with many users & groups, or servers joined to a domain.

Input
  • windows_server: a WindowsServer dictionary

  • group_name: the name of the group

Output

A list of User dictionaries.

Example
1
2
3
4
5
- windows_server.groups.get_users:
    group_name: Remote Desktop Users
  load:
    windows_server: windows_server
  save: remote_desktop_users

windows_server.groups.

select

Display groups in a table & prompt the task operator to make a selection.

The table will have the following columns:

  • Name
  • Description

Minimum Plugin Version: 3.0.0

Input
  • text: the title of the table

  • groups: any number of Groups

  • minimum: the minimum number of selections

  • maximum: the maximum number of selections

Output

A Selection containing:

  • total: the number of selected Groups

  • all: a list of selected Groups

  • first: the first selected Group

Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
- windows_server.groups.get_all:
  load:
    windows_server: windows_server
  save: groups

- windows_server.groups.select:
    text: Select Groups
  load:
    groups: groups
  save: selection

windows_server.groups.

select_one

Display groups in a table & prompt the task operator to select one.

The table will have the following columns:

  • Name
  • Description

Minimum Plugin Version: 3.0.0

Input
  • text: the title of the table

  • groups: any number of Groups

Output

A single Group.

Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
- windows_server.groups.get_all:
  load:
    windows_server: windows_server
  save: groups

- windows_server.groups.select_one:
    text: Select a Group
  load:
    groups: groups
  save: group