Полезное‎ > ‎CMD‎ > ‎dsget‎ > ‎


DSGET Server

Display server(s) from active directory.

      DSGET Server ServerDN [-dn] [-desc] [-dnsname] [-site] [-isgc]
         [{-s Server | -d Domain}] [-u UserName] [-p {Password | *}]
            [-c] [-q] [-l] [{-uc | -uco | -uci}]  
      DSGET Server ServerDN 
         [{-s Server | -d Domain}] [-u UserName] [-p {Password | *}]
            [-c] [-q] [-l] [{-uc | -uco | -uci}] {[-topobjowner Display] | [-part PartitionDN]}
   ServerDN  Distinguished Name of the server to view.
   -dn      Display the distinguished name
   -desc    Display the description
   -dnsname Display the Domain Name System (DNS) host name
   -site    Display the site name
   -isgc    Display whether a server is a global catalog server (yes/no)
   -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.
   -uc      Unicode format
   -uco     Unicode format for output only
   -uci     Unicode format for input only
   -part    Connect to the directory partition PartitionDN 
 -topobjowner Display a sorted list of security principals(users, computers etc)
            that own the largest number of directory objects across all directory
            partitions on the server and the number of objects they own.
            The number of accounts to list is specified by Display.
            0 = Display all object owners
            Default = 10 principals.

DS* commands are available on networked machines with the server role A.D. Domain Services installed, Domain Controllers (or for XP users: XP Professional).

Dsget can accept stdin from the keyboard, from a redirected file, or as piped output from another command e.g. DSQuery

-topobjowner and -part will override any other parameters specified.


Find all domain controllers in the current domain and display their DNS host names, site names and GCS status:

C:\> dsquery server | dsget server -dnsname -site -isgc

Display the distinguished name and description of domain controller Dom1:

C:\> dsget server CN=Dom1,CN=Servers,CN=AcmeCo,DC=ss64,DC=Com -dn -desc

“There’s no such thing as a free lunch” - Milton Friedman

Related commands:

DSAdd - Add object
DSGet - Display object
DSMod - Modify object
DSMove - Move object
DSQuery - Search for objects
DSRM - Delete object