SYNOPSIS
groupinfo
[
groupinfo
[
groupinfo
DESCRIPTION
The groupinfo command displays information on a single group or all groups, adds or deletes groups, and updates group information. All forms of the groupinfo command manage information on both local and global groups.
groupinfo can take three forms:
-
The first -- given none of the add (
-a ), update (-u ), or delete (-d ) options -- displays information on the specified group or, if no group is specified, all groups on your system. -
If the add (
-a ) or update (-u ) options are used with groupinfo, groups must be specified on the command line. The given fields are added or updated. -
If neither of the above forms of groupinfo is used,
the delete (
-d ) operation must be specified. Each group given on the command line is deleted.
In Active Directory/domain terms, there are three kinds of groups: local,
global, and universal.
The groupinfo utility treats "domain global" and "domain
universal" groups the same and can access such groups using the
- Note:
-
There is no such thing as a "machine global" group.
Options
-a -
adds a group. Each specified group-name is added. If any
-f options are given in conjunction with this option, they apply to all groups added. -b -
produces brief output. One line of output is displayed for each group with just the name and description of the group list.
-d -
deletes a group. Each specified group-name is deleted.
-D domain-name-
locates the primary domain controller of the specified domain-name, and requests that machine to perform the actions on behalf of the groupinfo command. groupinfo normally performs actions on the local system.
The
-D and-S options are mutually exclusive.- Note:
-
To operate on the global groups of the domain controller, you must also specify the
-g option; otherwise, groupinfo operates on the domain conntroller's local groups.
-e -
displays the error number contained in the errno variable for any system error that occurs and exits. You can use the strerror utility to display the system error message corresponding to this error number.
-f fieldname:value-
assigns value to the specified fieldname. The following fieldnames are currently accepted:
Comment Comment associated with the group.
For a more complete description of these fields, consult the 8.1/2012R2/10/2016/2019/11/2022 administrative documentation.
-g -
operates on the global groups.
-l and-g are mutually exclusive options. If neither the-l nor-g options are specified, the default is to operate on the local groups. -l -
operates on the local groups.
-m -
displays a single line for each specified group, containing a tab separated list of all group members. If no options are specified, the default display format is verbose.
Note that user and group names may have spaces in them.
-S hostname-
requests that the specified host perform the actions on behalf of the groupinfo command. groupinfo normally performs actions on the local system. Optionally, hostname may be preceded by \\ or //.
The
-D and-S options are mutually exclusive. -s -
sorts group list.
- Note:
-
When using the
-s option with the-b option to produce a sorted brief list of groups, the list is actually generated faster than just using the-b option.
-u -
updates a group. Each specified group-name has one or more fields updated. The fields to update are specified with
-f options. -1 -
displays a single line for each specified group, containing the group name and comment separated by tabs. If no options are specified, the default display format is verbose.
EXAMPLES
The following script takes all the members of a group on another host, and adds them to the same group locally.
group=accounting # Specifies the group remote=acctsrv1 # Specifies the remote host IFS='<TAB>' # Note that groupinfo may return user names # with spaces in them! This protects these # names from being split by the for command. for user in $(groupinfo -S '\\'$remote -m $group) do member -g $group -a $user done
DIAGNOSTICS
Possible exit status values are:
PORTABILITY
Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.
AVAILABILITY
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
PTC MKS Toolkit 10.4 Documentation Build 39.