Google
Search WWW Search msexchangetips.blogspot.com

Wednesday, May 09, 2007

Exchange: DSQUERY Is Your Friend

Summary: Dsquery is a powerful search command tool that can help you find users, or users with certain attributes. Below are some sample searches to give you an idea of how to use dsquery and it's syntax.


Example 1.

In this example, I want to find to export objects and who has ownership. For example, I want to find the owners of distribution lists that they can manage.

C:\Documents and Settings\JamesMVP>dsquery * -limit 200000 dc=corp,dc=mycompany,dc=com -filter "(&(objectclass=*)(objectcategory=*))" -attr displayname managedby > c:\managedby.txt


Example 2.

In this example, I want to list all users that are in a certain mailbox store using the homemdb attribute.

C:\Documents and Settings\JamesMVP>dsquery * dc=corp,dc=mycompany,dc=com -filter "(&(objectclass=user) (object category=person)(homemdb=CN=Mailbox Store (EX3),CN=First Storage Group,CN= InformationStore,CN=EX3,CN=Servers,CN=First Administrative Group,CN=Admini strative Groups,CN=DSTTEST,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC =corp,DC=company,DC=local))" -attr displayname > c:\mailboxes.txt


James Chong (MVP)
MCSE M+, S+, MCTS, Security+
msexchangetips.blogspot.com
ftp://ftp://ftp.smtp25.org//

How useful was this article? Want to see a tip not listed? Please leave a comment.

5 Comments:

Anonymous Anonymous said...

My friends like to play it and buy aoc gold. If you have money to buy age of conan gold, you will find it is very useful. Earning conan gold is not so hard. Try your best and then you can get it. I buy cheap aoc gold, just because I like it. So simple the aoc money is.

I am so happy to get some aion kina from my friends. They know I need aion online kina, they give me. So I always can get some aion gold from my friends. I buy aion kina with my spare money. It makes me happy that I can still earn some cheap aion kina.

7:44 PM  
Anonymous Anonymous said...

i'm wondering if it's possible to use "dsquery" to filter out users residing in an ou, who don't have a mailbox or who have a mailbox , in either case that would be helpful

1:52 PM  
Anonymous rose online zulie said...

Now do you worried about that in the game do not had enough rohan crone to play the game, now you can not worried, my friend told me a website, in here you can buy a lot rohan gold and only spend a little money, do not hesitate, it was really, in here we had much rohan online crone, we can sure that you will get the rohan online gold, quick to come here to buy rohan money.

Now do you worried about that in the game do not had enough Rose zuly to play the game, now you can not worried, my friend told me a website, in here you can buy a lot rose zulie and only spend a little money, do not hesitate, it was really, in here we had much rose online zuly, we can sure that you will get the rose online zulie, quick to come here to buy Arua ROSE zuly.

6:09 PM  
Anonymous Anonymous said...

For many people, the first type of Men’ Footwear that we believe that during the consideration of Hogan scarpe for men in May of tennis shoes or even a generic cross-training shoes. For others, they believe in May of Hogan scarpe donna , it depends on your background. In fact, this category of hogan donna covers a wide range of sports shoes and leisure activities ranging from golf and basketball and soccer shoes race. I tend to buy Hogan scarpe uomo against training only because I am involved in a wide range of sports and weightlifting, the race to play basketball.

5:39 PM  
Blogger love supra said...

They are all beautiful and fashionable i have to say, and my friends told me they are of good quality as well. I have not see post good enough like yours here.
More tags:
wow gold | cheap wow gold | buy cheap wow gold | buy wow gold

12:48 AM  

Post a Comment

<< Home

xml:lang="en" lang="en"> MS Exchange Tips: Exchange: DSQUERY Is Your Friend