Thanks for the advice this worked....
Set objNetwork = CreateObject("Wscript.Network")
strcomputername = ucase((objnetwork.computername))
msgbox strcomputername
Const ADS_PROPERTY_APPEND = 3
Set objGroup = GetObject _
("LDAP://cn=Domain XP Coversion,ou=Groups,dc=Company name,dc=com")...
This is what I got so far... The script fails at line 16. Am I doing something wrong with my COMPUTERNAME variable?
Function ADSysInfo(strADSysInfo)
Dim ADsys
Set ADsys = CreateObject("ADSystemInfo")
Select case (ucase(strADSysInfo))
Case "COMPUTERNAME"
ADSysInfo =...
I forgot to put on the initial post that I figured a Batch file wouldnt work so I attempted to write a vbs script to get it to work. I figured if I could make the script work with one computer then I could move on to making it work on any computer the script was run on.
I am not sure where to begin... this is what I tried to this point.
Set objGroup = GetObject _
("LDAP://cn=XP Coversion;ou=Groups;dc="Company",dc=com")
' "XP Conversion" is the group I would like it to be placed
objGroup.PutEx ADS_PROPERTY_APPEND, _
"member"...
I am working on my companies workstation image. I am trying to write a script for all Computers built with this image to add themselves to a specific Active Directory Group. At first I thought a simple bat file using "dsmod" would work. However I realized I needed a way to make the batch file...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.