Windows Vista Forums

active directory rootdse

  1. #1


    IT Staff Guest

    active directory rootdse

    in vbscript, i did :

    set oroot = getobject("LDAP://rootdse")
    set odomain = getobject("LDAP://" & oroot.get("defaultnamingcontext"))


    In powershell, i hard-code $strBase = "<LDAP://dc=xxx,dc=com>"

    Does powershell have the equivalent of what i stated above for vbscript ?





      My System SpecsSystem Spec

  2.   


  3. #2


    Shay Levi Guest

    Re: active directory rootdse

    $ad = [adsi]"LDAP://rootdse"
    $ad.defaultNamingContext

    PS C:\Scripts> $ad | gm | select name

    Name
    ----
    configurationNamingContext
    currentTime
    defaultNamingContext
    dnsHostName
    domainControllerFunctionality
    domainFunctionality
    dsServiceName
    forestFunctionality
    highestCommittedUSN
    isGlobalCatalogReady
    isSynchronized
    ldapServiceName
    namingContexts
    rootDomainNamingContext
    schemaNamingContext
    serverName
    subschemaSubentry
    supportedCapabilities
    supportedControl
    supportedLDAPPolicies
    supportedLDAPVersion
    supportedSASLMechanisms



    Shay
    http://www.scriptolog.blogspot.com



    > in vbscript, i did :
    >
    > set oroot = getobject("LDAP://rootdse")
    > set odomain = getobject("LDAP://" & oroot.get("defaultnamingcontext"))
    > In powershell, i hard-code $strBase = "<LDAP://dc=xxx,dc=com>"
    >
    > Does powershell have the equivalent of what i stated above for
    > vbscript ?
    >




      My System SpecsSystem Spec

  4. #3


    /\/\o\/\/ [MVP] Guest

    Re: active directory rootdse

    [adsi]''

    will treturn the defaulnamingContext also.

    Greetings /\/\o\/\/


    "Shay Levi" wrote:

    > $ad = [adsi]"LDAP://rootdse"
    > $ad.defaultNamingContext
    >
    > PS C:\Scripts> $ad | gm | select name
    >
    > Name
    > ----
    > configurationNamingContext
    > currentTime
    > defaultNamingContext
    > dnsHostName
    > domainControllerFunctionality
    > domainFunctionality
    > dsServiceName
    > forestFunctionality
    > highestCommittedUSN
    > isGlobalCatalogReady
    > isSynchronized
    > ldapServiceName
    > namingContexts
    > rootDomainNamingContext
    > schemaNamingContext
    > serverName
    > subschemaSubentry
    > supportedCapabilities
    > supportedControl
    > supportedLDAPPolicies
    > supportedLDAPVersion
    > supportedSASLMechanisms
    >
    >
    >
    > Shay
    > http://www.scriptolog.blogspot.com
    >
    >
    >
    > > in vbscript, i did :
    > >
    > > set oroot = getobject("LDAP://rootdse")
    > > set odomain = getobject("LDAP://" & oroot.get("defaultnamingcontext"))
    > > In powershell, i hard-code $strBase = "<LDAP://dc=xxx,dc=com>"
    > >
    > > Does powershell have the equivalent of what i stated above for
    > > vbscript ?
    > >

    >
    >
    >


      My System SpecsSystem Spec


active directory rootdse
Similar Threads
Thread Forum
active directory PowerShell
Active Directory Vista mail
Active Directory Vista networking & sharing
Active Directory PowerShell
active directory PowerShell