salt.modules.win_groupadd
Manage groups on Windows
Important
If you feel that Salt should be using this module to manage groups on a minion, and it is using a different module (or gives an error similar to 'group.info' is not available), see here.
-
Add the specified group
- Parameters
-
name (str) -- The name of the group to add
- Returns
-
True
if successful, otherwiseFalse
- Return type
CLI Example:
salt '*' group.add foo
salt.modules.win_groupadd.add(name, **kwargs)
-
Add a user to a group
- Parameters
- Returns
-
True
if successful, otherwiseFalse
- Return type
CLI Example:
salt '*' group.adduser foo username
salt.modules.win_groupadd.adduser(name, username, **kwargs)
-
Remove the named group
- Parameters
-
name (str) -- The name of the group to remove
- Returns
-
True
if successful, otherwiseFalse
- Return type
CLI Example:
salt '*' group.delete foo
salt.modules.win_groupadd.delete(name, **kwargs)
-
Remove a user from a group
- Parameters
- Returns
-
True
if successful, otherwiseFalse
- Return type
CLI Example:
salt '*' group.deluser foo username
salt.modules.win_groupadd.deluser(name, username, **kwargs)
-
Return info on all groups
- Parameters
-
refresh (bool) -- Refresh the info for all groups in
__context__
. If False only the groups in__context__
will be returned. If True the__context__
will be refreshed with current data and returned. Default is False - Returns
-
A list of groups and their information
CLI Example:
salt '*' group.getent
salt.modules.win_groupadd.getent(refresh=False)
-
Return information about a group
- Parameters
-
name (str) -- The name of the group for which to get information
- Returns
-
A dictionary of information about the group
- Return type
CLI Example:
salt '*' group.info foo
salt.modules.win_groupadd.info(name)
-
Return a list of groups
- Parameters
-
refresh (bool) -- Refresh the info for all groups in
__context__
. If False only the groups in__context__
will be returned. If True, the__context__
will be refreshed with current data and returned. Default is False - Returns
-
A list of groups on the machine
- Return type
CLI Example:
salt '*' group.list_groups
salt.modules.win_groupadd.list_groups(refresh=False)
-
Ensure a group contains only the members in the list
- Parameters
- Returns
-
True
if successful, otherwiseFalse
- Return type
CLI Example:
salt '*' group.members foo 'user1,user2,user3'
salt.modules.win_groupadd.members(name, members_list, **kwargs)
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.win_groupadd.html