Display computer object(s) from active directory.
Syntax DSGET Computer Computer_DN [-dn] [-samid] [-sid] [-desc] [-loc] [-disabled] [{-s Server | -d Domain}] [-u UserName] [-p {Password | *}] [-c] [-q] [{-uc | -uco | -uci}] [-part PartitionDN [-qlimit] [-qused]] DSGET Computer Computer_DN [-memberof [-expand]] [{-s Server | -d Domain}] [-u UserName] [-p {Password | *}] [-c] [-q] [-l] [{-uc | -uco | -uci}] Key Computer_DN Distinguished Name of the computer object list (first variation) or single computer (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 -loc Display the location -disabled Display the disabled status (Yes/No) -memberof Display the immediate list of groups of which the computer is a member. -expand Display the recursively expanded list of groups of which the computer is a member. -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 computer in PartitionDN -qused Display how much of its quota a computer has used in PartitionDN -uc Unicode format -uco Unicode format for output only -uci Unicode format for input only
To also make the computer a member of a specific group (for applying group policy), use the -memberof option.
Examples
Display the list of all groups, to which pc64 belongs:
C:\> dsget computer cn=pc64,ou=computers,dc=ss64,dc=com -memberof -expand
Display the descriptions of all computers in an organizational unit (OU) named France whose name starts with "pari"
C:\> dsquery computer OU=France,DC=ss64,DC=Com -name pari* | dsget computer -desc
“Hardware: the parts of a computer that can be kicked” ~ Jeff Pesis
Related:
DSAdd - Add object.
DSMod - Modify object.
DSGet - Display object.
DSMove - Move object.
DSQuery - Search for objects.
DSRM - Delete object.
PowerShell: Get-adComputer - Get one or more AD computers.