A
A.D.D
Hey All!
When creating a new computer object, we change the 'users/group can
join this computer to a domain' option from 'Domain Admins' to
'Authenticated Users'.
I'm trying to accomplish it with a script as shown below. If I leave
out the defaultgroup line, the object gets created. When run with the
defaultgroup I get an error - a constraint violation occurred. Am I
using the correct attribute ('defaultGroup') to accomplish this and if
so how do I fix it? If not, which attribute do I use?
Thanks
GHG
Set objComputer = objContainer.Create("Computer", "cn=" &
strComputer)
objComputer.Put "sAMAccountName", strComputer & "$"
objComputer.Put "Description", strDescriptionobjComputer.Put "userAccountControl", 4096
objComputer.SetInfo
When creating a new computer object, we change the 'users/group can
join this computer to a domain' option from 'Domain Admins' to
'Authenticated Users'.
I'm trying to accomplish it with a script as shown below. If I leave
out the defaultgroup line, the object gets created. When run with the
defaultgroup I get an error - a constraint violation occurred. Am I
using the correct attribute ('defaultGroup') to accomplish this and if
so how do I fix it? If not, which attribute do I use?
Thanks
GHG
Set objComputer = objContainer.Create("Computer", "cn=" &
strComputer)
objComputer.Put "sAMAccountName", strComputer & "$"
objComputer.Put "Description", strDescriptionobjComputer.Put "userAccountControl", 4096
objComputer.SetInfo