Results 1 to 5 of 5

Thread: DSGET - where am I going wrong

  1. #1
    Jingle Man Guest

    DSGET - where am I going wrong

    No matter what I have tried I cannot get a DSGET query to work for me.
    I'm running a simple network with two 2003 DCs SP1 & a memebr server.

    The domain is called ST-SCHOOL.LOCAL

    All I want is to get a list of user IDs and full names from a group called 6V
    The syntax I am putting in is as follows:

    dsget group "CN=6V,DC=ST-SCHOOL,DC=LOCAL" -members -expand

    I have tried without quotes, I have tried putting in the path to the OU - [
    OU=CSE,OU=GROUPS ] still nothing.
    Keep getting the error message directory object not found
    I've also tried different groups etc - in fact I have not got one DSGET
    command to work at all.
    Did a quick search on my Tech Net and found article ID 890040 but as this is
    included in SP1 I thought all would be ok. Turned off the firewall also -
    still the same. I am logging in to the DC using RDP but I cannot see that
    making a difference.
    Any help would be appreciated as I am pulling my hair out - also tried using
    ADfind - still nothing !! AAAGHHH

  2. #2
    Richard Mueller [MVP] Guest

    Re: DSGET - where am I going wrong

    The syntax of the dsget command looks correct, so the Distinguished Name of
    the group must be wrong. In fact, I doubt the group is in the root of the
    domain, as your example indicates. The group "cn=6V" is most likely either
    in the "cn=Users" container, or in an OU. You need to know the Distinguished
    Name of the group. It should be similar to:

    CN=6V,cn=Users,DC=ST-SCHOOL,DC=LOCAL
    CN=6V,ou=Students,DC=ST-SCHOOL,DC=LOCAL
    CN=6V,ou=Students,ou=School,DC=ST-SCHOOL,DC=LOCAL

    If you don't know the Distinguished Name (DN) of the group, you might be
    able to use dsquery and pipe the DN to dsget. I think the syntax would be:

    dsquery group "DC=ST-SCHOOL,DC=LOCAL" -name 6V* | dsget
    group -members -expand

    In both cases (dsget and dsquery) the quotes are only required if the name
    has spaces, but it can't hurt to use them.

    --
    Richard Mueller
    Microsoft MVP Scripting and ADSI
    Hilltop Lab - http://www.rlmueller.net
    --

    "Jingle Man" <JingleMan@discussions.microsoft.com> wrote in message
    news:7F943700-90FB-46DF-AE65-1A3D79BEB101@microsoft.com...
    > No matter what I have tried I cannot get a DSGET query to work for me.
    > I'm running a simple network with two 2003 DCs SP1 & a memebr server.
    >
    > The domain is called ST-SCHOOL.LOCAL
    >
    > All I want is to get a list of user IDs and full names from a group
    > called 6V
    > The syntax I am putting in is as follows:
    >
    > dsget group "CN=6V,DC=ST-SCHOOL,DC=LOCAL" -members -expand
    >
    > I have tried without quotes, I have tried putting in the path to the OU -
    > [
    > OU=CSE,OU=GROUPS ] still nothing.
    > Keep getting the error message directory object not found
    > I've also tried different groups etc - in fact I have not got one DSGET
    > command to work at all.
    > Did a quick search on my Tech Net and found article ID 890040 but as this
    > is
    > included in SP1 I thought all would be ok. Turned off the firewall also -
    > still the same. I am logging in to the DC using RDP but I cannot see that
    > making a difference.
    > Any help would be appreciated as I am pulling my hair out - also tried
    > using
    > ADfind - still nothing !! AAAGHHH




  3. #3
    Jingle Man Guest

    Re: DSGET - where am I going wrong

    Thanks for the reply - the DSQUERY helped and produced some results. I still
    cannot get the DSGET to work though. When I used the DSQUERY:

    dsquery group "dc=st-school,dc=local" -name 6V* | dsget group -members -expand

    I get the following: [ Of course there are more ]

    "CN=hadams,OU=Students,OU=CSE,DC=st-school,DC=local"

    I have tried to use that info to get the DSGET to work but again no luck.

    I tried:

    dsget group cn=6v,ou=students,ou=CSE,dc=st-school,dc=local -members -expand

    I get the directory object not found message again.

    On checking the distinguished name I checked the AD path to the groups OU
    and it looks like this:

    ST-SCHOOL.LOCAL
    |
    |
    CSE (OU) +
    GROUPS (OU)


    Also insdie the CSE OU are other OUs - Students, Staff, PrePrep etc

    If I have the distinguished name wrong, is there a way or method of finding
    it ?
    Thanks for your help on this - its much apprecaited.







    "Richard Mueller [MVP]" wrote:

    > The syntax of the dsget command looks correct, so the Distinguished Name of
    > the group must be wrong. In fact, I doubt the group is in the root of the
    > domain, as your example indicates. The group "cn=6V" is most likely either
    > in the "cn=Users" container, or in an OU. You need to know the Distinguished
    > Name of the group. It should be similar to:
    >
    > CN=6V,cn=Users,DC=ST-SCHOOL,DC=LOCAL
    > CN=6V,ou=Students,DC=ST-SCHOOL,DC=LOCAL
    > CN=6V,ou=Students,ou=School,DC=ST-SCHOOL,DC=LOCAL
    >
    > If you don't know the Distinguished Name (DN) of the group, you might be
    > able to use dsquery and pipe the DN to dsget. I think the syntax would be:
    >
    > dsquery group "DC=ST-SCHOOL,DC=LOCAL" -name 6V* | dsget
    > group -members -expand
    >
    > In both cases (dsget and dsquery) the quotes are only required if the name
    > has spaces, but it can't hurt to use them.
    >
    > --
    > Richard Mueller
    > Microsoft MVP Scripting and ADSI
    > Hilltop Lab - http://www.rlmueller.net
    > --
    >
    > "Jingle Man" <JingleMan@discussions.microsoft.com> wrote in message
    > news:7F943700-90FB-46DF-AE65-1A3D79BEB101@microsoft.com...
    > > No matter what I have tried I cannot get a DSGET query to work for me.
    > > I'm running a simple network with two 2003 DCs SP1 & a memebr server.
    > >
    > > The domain is called ST-SCHOOL.LOCAL
    > >
    > > All I want is to get a list of user IDs and full names from a group
    > > called 6V
    > > The syntax I am putting in is as follows:
    > >
    > > dsget group "CN=6V,DC=ST-SCHOOL,DC=LOCAL" -members -expand
    > >
    > > I have tried without quotes, I have tried putting in the path to the OU -
    > > [
    > > OU=CSE,OU=GROUPS ] still nothing.
    > > Keep getting the error message directory object not found
    > > I've also tried different groups etc - in fact I have not got one DSGET
    > > command to work at all.
    > > Did a quick search on my Tech Net and found article ID 890040 but as this
    > > is
    > > included in SP1 I thought all would be ok. Turned off the firewall also -
    > > still the same. I am logging in to the DC using RDP but I cannot see that
    > > making a difference.
    > > Any help would be appreciated as I am pulling my hair out - also tried
    > > using
    > > ADfind - still nothing !! AAAGHHH

    >
    >
    >


  4. #4
    Join Date
    Sep 2007
    Posts
    1

    D:\>dsget group "cn=conservation,cn=groups,ou=cambourne,dc=wildser v2,dc=wildlifebcnp,dc=local -members

    dsget group cn=conservation,cn=groups,ou=cambourne,dc=wildserv2,dc=wildlifebcnp,dc=local -members

    i run that and it comes back with

    dsget failed: A referral was returned from ther server

    where am i going wrong!

  5. #5
    Join Date
    May 2011
    Posts
    1

    Re: DSGET - where am I going wrong

    For anyone that still cant figure this out, your Domain entries need to be complete so if my domain was microsoft.com my entries will be DC=microsoft, DC=com

    if alternatively my domain is wildlifebcnp.org then I need to enter
    DC=wildlifebcnp, DC=org

    if my domain ends in .sk.ca
    then DC=sk, DC=ca
    needs to be included

    hope this helps anyone having the error:
    dsget failed:A referral was returned from the server.

Similar Threads

  1. using Dsquery and DSGET
    By etechelp in forum Active Directory
    Replies: 1
    Last Post: 20-07-2011, 11:32 PM
  2. dsquery and dsget
    By aconti in forum Active Directory
    Replies: 1
    Last Post: 01-11-2009, 04:09 PM
  3. Cleaning up DSGET group command output
    By IT2 Myers, Tyler in forum Active Directory
    Replies: 5
    Last Post: 14-10-2009, 06:26 AM
  4. Dsget group members SID
    By Jeremy Smith in forum Active Directory
    Replies: 3
    Last Post: 22-11-2008, 06:32 AM
  5. List of Last Logon Time with dsget/dsquery
    By Viensterrr in forum Active Directory
    Replies: 1
    Last Post: 17-09-2008, 05:36 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,066,459.58715 seconds with 17 queries