groupinfo

manipulate 10/2016/2019/11/2022/2025 group information 

Command


SYNOPSIS

groupinfo [-b] [-es] [-g|-l] [-1|-m] [-D domain-name | -S hostname] [group-name] ...

groupinfo [-e] (-a|-u) [-g|-l] [-D domain-name | -S hostname] [-ffieldname:value] group-name ...

groupinfo -d [-e] [-g|-l] [-D domain-name | -S hostname] group-name ...


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:

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 -D -g option combination. It is important to note that "machine local" groups and "domain local" groups are not the same. The former is defined at a given host and can only be resolved there while the latter is defined by an Active Directory administrator and can be resolved anywhere in the domain. To access a "domain local" group, use the -D -l option combination; to aceess a "machine local" group, use just the -l option.

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.

-Ddomain-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.

-ffieldname: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 10/2016/2019/11/2022/2025 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:

0 

Successful completion.

1 

A usage error occurred.

3 

A system error occurred.


PORTABILITY

Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022. Windows Server 2025.


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

Commands:
member, userinfo


PTC MKS Toolkit 10.5 Documentation Build 40.