Add New Computer Object With VBS
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", strDescription
objComputer.Put "defaultGroup", "Authenticated Users" <<
objComputer.Put "userAccountControl", 4096
objComputer.SetInfo
.
Relevant Pages
- Re: Adding multiple entries for the same user with xcacls...
... I just assumed I was heading down the wrong path. ... I also need to give Domain Admins specific access to "This Folder ... When I use xcacls, the last command just overwrites the first... ... accomplish this, I am open to other possibilities. ... (microsoft.public.windows.server.security) - Re: Adding multiple entries for the same user with xcacls...
... existing grants for the principal rather than replacing them ... I also need to give Domain Admins specific access to "This Folder ... When I use xcacls, the last command just overwrites the first... ... accomplish this, I am open to other possibilities. ... (microsoft.public.windows.server.security) - Re: adding another domain user as domain admins group
... What exactly are you trying to accomplish? ... Domain Admins are for the most part result from the fact that this group is ... by default a member of local Administrators group on all domain member ... computers and the domain local Administrators group. ... (microsoft.public.windows.server.active_directory) - User Rights
... my clients are either Windows XP or Windows 2000. ... to accomplish this besides giving them 'Domain Admins' privilege. ... I have read one suggestion is to use 'Restricted Group' but I don't know how ... (microsoft.public.windows.server.active_directory) - Re: Can a computer object be in two or more OUs?
... So why don't you start a new thread and describe what exactly you want to accomplish and see if somone can help out with what you specifically want to accomplish. ... I've defined an OU and a sub OU: ... can I put a computer object in the "Windows XP Machines" OU and in the ... (microsoft.public.windows.server.active_directory) |
|