Quantcast
Viewing all articles
Browse latest Browse all 13

DS Commands – DSGET

Image may be NSFW.
Clik here to view.

Retrieving Information about Objects with DSGET

You can use the dsget command to retrieve information about objects. The dsget command is useful when you want to get a list of group members or user group membership.


Note: The primary difference between dsquery and dsget is that dsquery retrieves mul- tiple objects that meet a given criteria, while dsget retrieves information about a single object.

dsget Command

Comments

Get a list of members for a group.

dsget group DN -members C:\>dsget group “cn=it admins, ou=east, ou=sales, dc=habib, dc=local” -members

Retrieves a list of members of the IT Admins group in the sales\east OU.


List group membership for a user. 

dsget user dn [-memberof -expand]

C:\>dsget user “cn=joe, ou=east, ou=sales, dc=habib, dc=local” -memberof

C:\>dsget user “cn=joe, ou=east, ou=sales, dc=habib, dc=local” -memberof -expand

The -memberof switch shows the direct group membership for a user. The -expand switch includes nested group membership.

For example, consider the Domain Users group, which is a member of the Users group. If a user is added to the Domain Users group, the user is indirectly a member of the Users group.

The -memberof switch shows the Domain Users group but not the Users group, unless the -expand switch is also included.


Image may be NSFW.
Clik here to view.


Filed under: Active Directory, Windows Server 2003, Windows Server 2008 Tagged: Active Directory commands, DS Commands, DSGET Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 13

Trending Articles