DSQUERY / DSGET

raiedraied Member Posts: 93 ■■■□□□□□□□
Can someone please explain the differance between DSQUERY and DSGET? Maybe provide example when to one command over the other.

Comments

  • dojodojo Member Posts: 9 ■□□□□□□□□□
    This is what I know:

    Dsquery finds and returns a set of objects from Active Directory based on search criteria. Dsget returns properties for one or mor specified objects.

    On my way to the MCSA highway!!
  • APAAPA Member Posts: 959
    DSquery:- funnily enough 'queries' icon_lol.gif A.D for objects that match a specified search criteria.

    expanding on that........

    DSquery can be used to create a list of objects the output can then be pipe to another command such as dsmod to make a configuration change. eg to a user account.

    eg Use DSquery to return a list of users who haven't changed their password for a certain number of days then pipe that output with | to dsmod which would configure the "User must change password at next logon" attribute within A.D for all those users.

    DSget:- to put it plain and simple, gets/displays properties of a specific object

    eg:- dsget user "CN=Adrian Arumugam,CN=Users,DC=adrian,DC=com" -memberof

    above command will display the groups the user belongs to. use -expand with the above command to include groups the user may belong to due to group nesting

    Hope this helps :D

    CCNA | CCNA:Security | CCNP | CCIP
    JNCIA:JUNOS | JNCIA:EX | JNCIS:ENT | JNCIS:SEC
    JNCIS:SP | JNCIP:SP
Sign In or Register to comment.