I have a problem with my script to add a user to a group.
the script is:
‘Add User To group
‘ Check these objects referenced by strOU, strGroup exist in strOU
‘strOU = “OU=Newport,”
‘strUser = “CN=Len Murray,”
‘strGroup = “CN=Coal Porters,”
‘ Bind to Active Directory and get LDAP name
Set objRootLDAP = GetObject(“LDAP://RootDSE”)
strDNSDomain = objRootLDAP.Get(“DefaultNamingContext”)
‘ Add (str)User to (str)Group
Set objUser = GetObject(“LDAP://” & stUser & stOU & strDNSDomain)
Set objGroup = GetObject(“LDAP://” & stGroup & stOU & strDNSDomain)
WScript.Echo “Check ” & strOU & ” for ” & strGroup & ” = ” & strUser
and the error i get is:
a referral was returned from the server
Can someone help me?
You must be logged in to reply to this topic.
Create a free account today to participate in forum conversations, comment on posts and more.