Display group(s) from active directory.
Syntax DSGET group GroupDN [-dn] [-samid] [-sid] [-desc] [-secgrp] [-scope] [{-s Server | -d Domain}] [-u UserName] [-p {Password | *}] [-c] [-q] [-l] [{-uc | -uco | -uci}] [-part PartitionDN [-qlimit] [-qused]] DSGET group GroupDN [{-memberof | -members}] [-expand] [{-s Server | -d Domain}] [-u UserName] [-p {Password | *}] [-c] [-q] [-l] [{-uc | -uco | -uci}] Key Computer_DN Distinguished Name of the group object list (first variation) or single group (second variation) to view. -dn Display the distinguished name -samid Display the Security Account Manager (SAM) account name -sid Display the computer security IDs (SID) -desc Display the description -secgrp Display Security groups (yes) or Distribution groups (no) -scope Display Local, Global, or Universal group scope -loc Display the location -disabled Display the disabled status (Yes/No) -memberof Display the immediate list of groups of which the group is a member -expand Display the recursively expanded list of groups of which the group is a member. -members Display the immediate list of members of the group -expand Display the recursively expanded list of members of the group. -s Server to connect to (Default=the domain controller in the logon domain.) -d Domain to connect to. -u Username with which the user logs on to a remote server. -p Password (UserName or Domain\UserName or Username@domain.com) -c Report errors, but continue with the next object after any error (when you specify multiple objects) by default dsget will exit when the first error occurs. -q Quiet, suppress all output -l Display entries in a list format. By default, dsget outputs a table format. -part Connect to the directory partition PartitionDN -qlimit Display the effective quota of the group in PartitionDN -qused Display how much of its quota a group has used in PartitionDN -uc Unicode format -uco Unicode format for output only -uci Unicode format for input only
Dsget can accept stdin from the keyboard, from a redirected file, or as piped output from another command e.g. DSQuery
Examples
Display the list of members, recursively expanded, of the Finance group:
C:\> dsget group "CN=Finance,OU=Groups,OU=AcmeCo,DC=ss64,DC=Com" -members -expand
“There are three classes of people: those who see. Those who see when they are shown. Those who do not see” ~ Leonardo da Vinci
Related commands:
DSAdd - Add object.
DSGet - Display object.
DSMod - Modify object.
DSMove - Move object.
DSQuery - Search for objects.
DSRM - Delete object.
PowerShell: Get-adGroup - Get one or more AD groups.
Q243330 - Well-known security identifiers (sids) in Windows operating systems.