
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