JoinDomainOrWorkGroup

  • Thread starter Thread starter Tom Ker
  • Start date Start date
T

Tom Ker

I'm using the following lifted pretty much intact with all the supporting
scripting from the TechNet web site to join a computer to our domain...

sRC = oComputer.JoinDomainOrWorkGroup("DomName.com", _
sPWD, "DomName\" & sID, NULL, _
JOIN_DOMAIN + ACCT_CREATE)

The problem I'm encountering is that it is not joining the domain all the
time. Sometimes it joins a workgroup named "DomName.com". Why would that
be happening? Is there a way to ensure it only joins the domain and not a
workgroup?

Thanks,

Tom
 
Thanks, that's what I did for Win2K and it did work well. I want to get
away from using external exe's, though. With NetDom I had to also use
SNetCFG to first add then remove Server Service so NetDom could do it's
thing since we generally don't deploy our workstations with Server Service
installed.

Tom
 
Back
Top