1.    23 Jul 2007 #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.    23 Jul 2007 #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

  3.    23 Jul 2007 #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


Similar Threads
Thread Forum
active directory
hello I must change some properties by all active directory users. see picture: user.jpg maybe in english is that the register: environment ...
PowerShell
Active Directory
In the accounts section, what is the "Active Directory?" Thanks.
Vista mail
Active Directory
Is there an MMC snapin for Vista Business 64 to admin AD Users & Computers? Thanks
Vista security
Active Directory
Hello all: After I joined the Vista (business) client to Windows 2003 active directory domain I am not able to login. I get an error message...
Vista General
Active Directory
Hello all: After I joined the Vista (business) client to Windows 2003 active directory domain I am not able to login. I get an error message...
Vista networking & sharing
Active Directory
Hello! I have 2 Questions: 1: How can i get the distinguished Name of the logged on User in a variable? I need this for our new LogonScript which...
PowerShell
active directory
Just downloaded powershell and have been playing around for a little bit.. Looks like I can finally drop those calls to rundll to add printers :)...
PowerShell

Our Sites
  • Ten Forums
  • Eight Forums
  • Seven Forums
  • PC Help Forum
  • Help Me Bake
  • Site Links
  • Contact Us
  • Privacy and Cookies
  • About Us
    Windows Vista Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

    Designer Media Ltd
    All times are GMT -5. The time now is 17:36.
    .