Question for Laura E. Hunter [MVP]

Discussion in 'Active Directory' started by Miguel, Aug 29, 2006.

  1. Miguel

    Miguel Guest

    hi:/
    In a question of the 24/08/2006 "DS Add User"
    You answer is very good, just i have a question.
    what should input in this part of the vbscript?

    ' Determine DNS domain name from RootDSE object.
    Set objRootDSE = GetObject("LDAP://RootDSE")
    strDNSDomain = objRootDSE.Get("DefaultNameContext")

    this is my computer:
    "ou=Server S.A de C.V,dc=galeana,dc=com,dc=mx"
    domain name (PRE-Windows 2000) is: MEXCENTRO


    my
     
    Miguel, Aug 29, 2006
    #1
    1. Advertisements

  2. I'm not Laura but In this part of the script You don't have to provide
    any input, You are taking advantage of rootDSE object property to
    determine domain name in which this script is executing (script is not
    executed in domain but on machine which is a part of a domain)

    You can read more about rootDSE here:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adschema/adschema/rootdse.asp

    This allows You to write script which will recognize domain in which it
    was executed.
     
    Tomasz Onyszko, Aug 29, 2006
    #2
    1. Advertisements

  3. If I'm reading your question correctly, like Tomasz says, you don't need to
    do anything unless you wish to use a specific server (which isn't going to
    be a recommended practice). If, however, you do wish to target a specific
    server for some reason, you use:

    LDAP://<server name>/RootDSE


    Instead of:

    LDAP://RootDSE


    Basically though, that code is saying: Find the closest DC and get the
    default NC (the local domain)

    Once you have that as your base, you can progress and do all kinds of stuff.
     
    Paul Williams [MVP], Aug 30, 2006
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.