Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Scripting the Adding of Computer Accounts

 
Logged in as: Guest
arrSession:exec spGetSession 2,7,2812
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [General Forum] >> Other Programming/Scripting Languages >> Scripting the Adding of Computer Accounts
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Scripting the Adding of Computer Accounts - 4/26/2005 8:32:05 PM   
  thirl1804

 

Posts: 1
Score: 0
Joined: 4/26/2005
From:
Status: offline
I'm trying to script the adding of computer accounts into our AD.

This has worked OK using the script below

Set objOU = GetObject("LDAP://ou=Test,dc=homeland,dc=local")
Set objPC = objOU.Create("Computer", "cn=computer1")
objPC.Put "sAMAccountName", "computer1"
objPC.Put "userAccountControl", 4096
objPC.SetInfo

This has created it and also enabled it.

However, whenever you add a new computer via AD, the default is to belong to the Domain Admins to join this PC to the domain. You can alter this group using AD, does anyone know how to script in an alternative group name?

Thanks in advance
Grizzle
 
 
Post #: 1
 
 Re: Scripting the Adding of Computer Accounts - 4/30/2005 4:27:10 AM   
  TNO


Posts: 1036
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
Try reposting in the vbscript forum..I seem to be the only person passing by this one lately.

(in reply to thirl1804)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [General Forum] >> Other Programming/Scripting Languages >> Scripting the Adding of Computer Accounts Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts