Adding computer account to w2k domain 
Author Message
 Adding computer account to w2k domain

I need to create computer accounts (W2k professional) in a W2k domain using
VB Scripting. I've seen a lot of examples for user accounts, but none for
computers, which I can't quite figure out. How Do I create these accounts
when I want them to be "managed Computers" (using GUID when installing the
machine later)?


Sat, 07 Aug 2004 16:59:51 GMT  
 Adding computer account to w2k domain

Quote:

> I need to create computer accounts (W2k professional) in a W2k domain using
> VB Scripting. I've seen a lot of examples for user accounts, but none for
> computers, which I can't quite figure out. How Do I create these accounts
> when I want them to be "managed Computers" (using GUID when installing the
> machine later)?

ADSI:

IADsContainer::Create method
http://msdn.microsoft.com/library/en-us/netdir/adsi/iadscontainer_cre...

Something like this might work:

DomainName = "domain"
CompName = "workstation"

Set DomainObj = GetObject("WinNT://" & DomainName)
Set CompObj = DomainObj.Create("computer", CompName)
CompObj.SetInfo

But it looks a bit more complicated here:

Automating the Creation of Computer Accounts
http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;q222525&

You can use Netdom.exe from the WNT/W2k Resource Kit:
Netdom.exe    Powerful command-line utility can be used to join a domain,
              manage computer accounts for members and BDCs, reset secure
              channels, establish trust relationships, and manage resource
              domain computer accounts

Do a search on MS Knowledge Base for Netdom.exe
There are some bug in the old versions of netdom.exe, use an uptodate version!

Here are SOME hits:

Automating the Creation of Computer Accounts
http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;q222525&

Resetting Computer Accounts in Windows 2000
http://support.microsoft.com/support/kb/articles/Q216/3/93.ASP

How to Use Netdom.exe to Reset Machine Account Passwords
http://support.microsoft.com/support/kb/articles/Q260/5/75.ASP

Using Batch Files to Automate Networking Tasks
http://support.microsoft.com/support/kb/articles/Q173/5/29.ASP

How to Use Netdom 2.0 to Create a Windows Computer Account on a Selected Domain
Controller
http://support.microsoft.com/support/kb/articles/Q266/6/51.ASP

Service Pack 2 Adds Updates to Several Windows 2000 Support Tools
http://support.microsoft.com/support/kb/articles/Q292/0/03.ASP

Also:
Migrating NT Workstations to a New Domain
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnt...

--
torgeir



Sun, 08 Aug 2004 03:37:56 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to add/remove an NT Computer account from Domain

2. Creating User/Computer account in NT Domain

3. Computer Accounts in New Domain

4. Removing Computer Accounts from NT Domain (with Static Names)

5. Adding a computer account to an AD group

6. How can I add a Domain Account to the Local Administrators Group

7. Can ADSI add machine accounts to the domain?

8. COM Adding a user(account) on the nt database(user domain)

9. How do I add a domain user account to a local group

10. Add computer to domain

11. Adding Computer to Domain script

12. add user to every computer in domain

 

 
Powered by phpBB® Forum Software