DSGET problem.

Discussion in 'Software' started by Daniel, Aug 11, 2009.

  1. Daniel

    Daniel Byte Poster

    236
    6
    25
    Hi guys,

    I'm having a DSGET issue, here is my input.

    Code:
    dsget user "CN=John Doe,OU=Opps,OU=IT,DC=westsim,DC=com" -memberof
    I get this error:

    Code:
    dsget failed:Directory object not found
    Obviously I've replaced the username and the company, but thats what it looks like.

    I've checked spelling, paths, it's all correct.

    I moved the user account to Opps and changed the dsget to this:

    Code:
    dsget user "CN=John Doe,OU=Opps,DC=westsim,DC=com" -memberof
    And it worked fine.

    Any help is appreciated :biggrin
     
    Certifications: 70-270, 70-290, 70-291
    WIP: None, but learning SEO/SEM
  2. Fergal1982

    Fergal1982 Petabyte Poster

    4,196
    172
    211
    Its kinda hard to help without access to the system to verify paths, etc. Basically dsget cant find the user in the specified path, which basically means they either arent in there, or you have the path wrong.

    Based on what you say, I assume that the "IT" ou is a subdirectory of the Opps OU (that, or your post made no sense whatsoever). In that case, you have the IT and Opps OUs the wrong way around.

    try
    Code:
    dsget user "CN=John Doe,OU=IT,OU=Opps,DC=westsim,DC=com" -memberof
     
    Certifications: ITIL Foundation; MCTS: Visual Studio Team Foundation Server 2010, Administration
    WIP: None at present
  3. Qs

    Qs Semi-Honorary Member Gold Member

    3,081
    70
    171
    Presumably it's this part...

    Code:
    OU=Opps,OU=IT
    Here's an article on dsget's syntax - Link

    Qs
     
    Certifications: MCT, MCSE: Private Cloud, MCSA (2008), MCITP: EA, MCITP: SA, MCSE: 2003, MCSA: 2003, MCITP: EDA7, MCITP: EDST7, MCITP: EST Vista, MCTS: Exh 2010, MCTS:ServerVirt, MCTS: SCCM07 & SCCM2012, MCTS: SCOM07, MCTS: Win7Conf, MCTS: VistaConf, MCDST, MCP, MBCS, HND: Applied IT, ITIL v3: Foundation, CCA
  4. Fergal1982

    Fergal1982 Petabyte Poster

    4,196
    172
    211
    If you arent sure of a users path, you can use the following to get it:

    Code:
    dsquery user -name john.doe
    to streamline you can pipe that into the dsget output too.

    Code:
    dsquery user -name john.doe | dsget user -memberof
    
     
    Certifications: ITIL Foundation; MCTS: Visual Studio Team Foundation Server 2010, Administration
    WIP: None at present
  5. Daniel

    Daniel Byte Poster

    236
    6
    25
    Hahaha, well well well, after 70-290 and 70-291 I never knew that DSGET didnt follow the hierarchical structure of AD.

    Just before I come on here to see if you lovely people had any ideas I tried swapping the OU's around and it worked!

    So anyways, thanks guys, brilliant as always :thumbleft!
     
    Certifications: 70-270, 70-290, 70-291
    WIP: None, but learning SEO/SEM
  6. Fergal1982

    Fergal1982 Petabyte Poster

    4,196
    172
    211
    It does, it just follows it in reverse. You start by naming the object, then the OU its in, then its OU (etc), then finally the domain details.
     
    Certifications: ITIL Foundation; MCTS: Visual Studio Team Foundation Server 2010, Administration
    WIP: None at present
  7. Qs

    Qs Semi-Honorary Member Gold Member

    3,081
    70
    171
    Yep, it does, hence the name at the start of the command and the domainname COM bits at the end.

    Qs
     
    Certifications: MCT, MCSE: Private Cloud, MCSA (2008), MCITP: EA, MCITP: SA, MCSE: 2003, MCSA: 2003, MCITP: EDA7, MCITP: EDST7, MCITP: EST Vista, MCTS: Exh 2010, MCTS:ServerVirt, MCTS: SCCM07 & SCCM2012, MCTS: SCOM07, MCTS: Win7Conf, MCTS: VistaConf, MCDST, MCP, MBCS, HND: Applied IT, ITIL v3: Foundation, CCA
  8. Daniel

    Daniel Byte Poster

    236
    6
    25
    Okay okay, I retract my previous statement, it does it in reverse.

    I worded my reply wrong as I was so excited about it working :dry:biggrin

    But yeah thanks Fergal and everyone else.
     
    Certifications: 70-270, 70-290, 70-291
    WIP: None, but learning SEO/SEM

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.