Announcement

Collapse
No announcement yet.

Exchange DSQUERY .... errr Query

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Exchange DSQUERY .... errr Query

    Hi All,

    I'm trying to use DSQUERY to return a list of users from a mailbox store and I'm having a little difficulty getting it to return any data, this is what I've managed so far with the assistance of Google, it seems to execute but returns no detail and no error:

    dsquery * dc=domain,dc=com -filter "(&(objectclass=user) (object category=person)(homemdb=CN=Mailbox Store (ServerName),CN=First Storage Group,CN=InformationStore,CN=ServerName,CN=Server,CN=AdministrativeGroupName,CN=Administrative Groups,CN=OrganisationName (Exchange),CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=domain,DC =com))" -attr displayname

    I'm sitting locally at the exchange server as the Exchange adminstrator

    Any assistance much appreciated
    Cheers
    Last edited by Mouse; 3rd October 2007, 14:27. Reason: Additional detail

  • #2
    Re: Exchange DSQUERY .... errr Query

    there are a few typo's in your command-line

    try and compare with this this batch:
    Code:
    SET DNDomain=dc=domain,dc=local
    SET SERVNM=servername
    
    DSQUERY.exe * -limit 0 -filter "(&(objectclass=user)(objectcategory=person)(homemdb=CN=Mailbox Store (%SERVNM%),CN=First Storage Group,CN=InformationStore,CN=%SERVNM%,CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=Organisation Name,CN=Microsoft Exchange,CN=Services,CN=Configuration,%DNDomain%))" -attr displayname >c:\mailboxes.txt
    note:
    CN=Organisation Name is w/out (Exchange)
    CN=Servers is w/ a 's'

    \Rems

    This posting is provided "AS IS" with no warranties, and confers no rights.

    __________________

    ** Remember to give credit where credit's due **
    and leave Reputation Points for meaningful posts

    Comment

    Working...
    X