globale Gruppe an AD Domäne erstellen

  • Allgemein

    globale Gruppe an AD Domäne erstellen

    hallo leute,

    ich versuche eine globale gruppe in einer ad-domäne zu erstellen. nur leider bekomme ich immer eine fehlermeldung "the object was not found on this server". die ou die ich eingebe stimmt, da bin ich mir 100% sicher. kann es an der formatierung des textes liegen? hier der ganze code:



    VB.NET-Quellcode

    1. Dim strOU, strGroup, strDNSDomain
    2. Dim objOU, objGroup, objUser
    3. strOU = InputBox ("OU eingeben: ")
    4. strNewGP = InputBox ("Gruppenname eingeben: ")
    5. strNewGpLong = "CN=" & strNewGp
    6. strOULong = "OU=" & strOU & ","
    7. Set objRootDSE = GetObject("LDAP://RootDSE")
    8. strDNSDomain = objRootDSE.Get("DefaultNamingContext")
    9. MsgBox strOULong & ", " & strDNSDomain
    10. Set objOULong = GetObject("LDAP://" & strOULong & strDNSDomain )
    11. Set objGroup = objOULong.Create("Group",strNewGpLong)
    12. objGroup.Put "sAMAccountName", strNewGp
    13. objGroup.setInfo
    14. Wscript.Quit




    ich hoffe mir kann jemand helfen, bin schon echt am verzweifeln... die msgbox hab ich nur zum prüfen eingebaut, also net wundern :)