I know this may be out of the scope of this group, but I don't know where to
look. I am trying to create a script that will among other things add a
computer to a domain. My script will read the current name for the PC. I
have found information on creating the computer account, but nothing on
adding it to the domain. Can any one help point me in the right direction
here?

Thanks,
Bob

Re: Domain help by Ray

Ray
Thu Dec 04 16:31:11 CST 2003

netdom.exe is the tool for that.

http://support.microsoft.com/?id=150493

Ray at work

"Bob Parr" <bob.parr@brinksinc.nospam..com> wrote in message
news:usKmvUruDHA.2180@TK2MSFTNGP09.phx.gbl...
> I know this may be out of the scope of this group, but I don't know where
to
> look. I am trying to create a script that will among other things add a
> computer to a domain. My script will read the current name for the PC. I
> have found information on creating the computer account, but nothing on
> adding it to the domain. Can any one help point me in the right direction
> here?
>
> Thanks,
> Bob
>
>



Re: Domain help by Torgeir

Torgeir
Thu Dec 04 16:37:50 CST 2003

Bob Parr wrote:

> I know this may be out of the scope of this group, but I don't know where to
> look. I am trying to create a script that will among other things add a
> computer to a domain. My script will read the current name for the PC. I
> have found information on creating the computer account, but nothing on
> adding it to the domain. Can any one help point me in the right direction
> here?

Hi

For WinXP or better:

JoinDomainOrWorkGroup Method in Class Win32_ComputerSystem
http://msdn.microsoft.com/library/en-us/wmisdk/wmi/joindomainorworkgroup_method_in_class_win32_computersystem.asp

An example on JoinDomainOrWorkGroup:
http://www.microsoft.com/technet/scriptcenter/compmgmt/ScrCM31.asp


For NT4, Win2k and WinXP:

Netdom.exe, more here:
http://groups.google.com/groups?selm=3FCE3A6C.932E8E4F@hydro.com


--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter



Re: Domain help by Bob

Bob
Thu Dec 04 17:11:32 CST 2003

Thanks. Will this work with Windows 2000? Also if it will, where can I
find it. I don't think my company still has any NT stuff.

Thanks again,
Bob

"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:eTfATZruDHA.556@TK2MSFTNGP11.phx.gbl...
> netdom.exe is the tool for that.
>
> http://support.microsoft.com/?id=150493
>
> Ray at work
>
> "Bob Parr" <bob.parr@brinksinc.nospam..com> wrote in message
> news:usKmvUruDHA.2180@TK2MSFTNGP09.phx.gbl...
> > I know this may be out of the scope of this group, but I don't know
where
> to
> > look. I am trying to create a script that will among other things add a
> > computer to a domain. My script will read the current name for the PC.
I
> > have found information on creating the computer account, but nothing on
> > adding it to the domain. Can any one help point me in the right
direction
> > here?
> >
> > Thanks,
> > Bob
> >
> >
>
>



Re: Domain help by Bob

Bob
Thu Dec 04 17:14:05 CST 2003

Thanks for the quick responce. Dou you know if this will work with Windows
2000?

Thanks again,
Bob

"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:3FCFB73E.B7663CA9@hydro.com...
> Bob Parr wrote:
>
> > I know this may be out of the scope of this group, but I don't know
where to
> > look. I am trying to create a script that will among other things add a
> > computer to a domain. My script will read the current name for the PC.
I
> > have found information on creating the computer account, but nothing on
> > adding it to the domain. Can any one help point me in the right
direction
> > here?
>
> Hi
>
> For WinXP or better:
>
> JoinDomainOrWorkGroup Method in Class Win32_ComputerSystem
>
http://msdn.microsoft.com/library/en-us/wmisdk/wmi/joindomainorworkgroup_method_in_class_win32_computersystem.asp
>
> An example on JoinDomainOrWorkGroup:
> http://www.microsoft.com/technet/scriptcenter/compmgmt/ScrCM31.asp
>
>
> For NT4, Win2k and WinXP:
>
> Netdom.exe, more here:
> http://groups.google.com/groups?selm=3FCE3A6C.932E8E4F@hydro.com
>
>
> --
> torgeir
> Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of the 1328 page
> Scripting Guide: http://www.microsoft.com/technet/scriptcenter
>
>



Re: Domain help by Torgeir

Torgeir
Thu Dec 04 17:53:18 CST 2003

Bob Parr wrote:

> Thanks for the quick responce. Dou you know if this will work with Windows
> 2000?

Hi

See the last part of my post (starting from "For NT4, Win2k and WinXP:")...


--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter



Re: Domain help by Torgeir

Torgeir
Thu Dec 04 17:56:12 CST 2003

Bob Parr wrote:

> Thanks. Will this work with Windows 2000? Also if it will, where can I
> find it. I don't think my company still has any NT stuff.

Hi

Netdom.exe will work on Win2k, but you must use the 2.x version. The link
provided by Ray is for Netdom.exe v1.x, and is not up to date on new
functionallity for 2.x. See my other post for more up to date information on
netdom.exe.


--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter



Re: Domain help by Bob

Bob
Mon Dec 08 14:30:07 CST 2003

Okay, I read the rest of the message and followed some of the links. As I
understand, in order to use netdom to add a computer to a domain, I need to
have the LanmanServer service running. And in order to intall this via
script, I need to export a reg key from a machine that has it running. What
if my location doesn't use lanman and doesn't have it running on any of our
servers?

Bob

"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:3FCFC8EE.18F79C64@hydro.com...
> Bob Parr wrote:
>
> > Thanks for the quick responce. Dou you know if this will work with
Windows
> > 2000?
>
> Hi
>
> See the last part of my post (starting from "For NT4, Win2k and
WinXP:")...
>
>
> --
> torgeir
> Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide:
> http://www.microsoft.com/technet/scriptcenter
>
>



Re: Domain help by Torgeir

Torgeir
Tue Dec 09 01:28:22 CST 2003

Bob Parr wrote:

> Okay, I read the rest of the message and followed some of the links. As I
> understand, in order to use netdom to add a computer to a domain, I need to
> have the LanmanServer service running. And in order to intall this via
> script, I need to export a reg key from a machine that has it running. What
> if my location doesn't use lanman and doesn't have it running on any of our
> servers?

Hi

You could install it temporary on a computer by installing File and Print
Sharing (using the GUI), and then export the registry file.

You could also try and see if this command line util can make it without the
server service available (I mean, the join domain using the GUI doesn't need
it):

The JoinDom freeware utility found at tip 5956 at
http://www.jsiinc.com/reghack.htm




--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter



Re: Domain help by Bob

Bob
Fri Dec 19 10:39:10 CST 2003

Okay I have been looking at the docs on using netdom to add a computer to a
domain via script. It seems that in order for this to work the server
service needs to be running. And as part of starting the server service
from a script, you need a registery key exported from a PC already running
the server service. In the docs I am reading there is reference to this
server service being called lanman server. I look in the services of the
manage utility and I see a "server" service but nothing about lanman. is
this the service that I need to be running on my PC to export the proper
registry key?

Bob

"Bob Parr" <bob.parr@brinksinc.nospam..com> wrote in message
news:ugff2vruDHA.620@TK2MSFTNGP10.phx.gbl...
> Thanks. Will this work with Windows 2000? Also if it will, where can I
> find it. I don't think my company still has any NT stuff.
>
> Thanks again,
> Bob
>
> "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
> news:eTfATZruDHA.556@TK2MSFTNGP11.phx.gbl...
> > netdom.exe is the tool for that.
> >
> > http://support.microsoft.com/?id=150493
> >
> > Ray at work
> >
> > "Bob Parr" <bob.parr@brinksinc.nospam..com> wrote in message
> > news:usKmvUruDHA.2180@TK2MSFTNGP09.phx.gbl...
> > > I know this may be out of the scope of this group, but I don't know
> where
> > to
> > > look. I am trying to create a script that will among other things add
a
> > > computer to a domain. My script will read the current name for the
PC.
> I
> > > have found information on creating the computer account, but nothing
on
> > > adding it to the domain. Can any one help point me in the right
> direction
> > > here?
> > >
> > > Thanks,
> > > Bob
> > >
> > >
> >
> >
>
>



Re: Domain help by Torgeir

Torgeir
Fri Dec 19 11:46:29 CST 2003

Bob Parr wrote:

> Okay I have been looking at the docs on using netdom to add a computer to a
> domain via script. It seems that in order for this to work the server
> service needs to be running. And as part of starting the server service
> from a script, you need a registery key exported from a PC already running
> the server service. In the docs I am reading there is reference to this
> server service being called lanman server. I look in the services of the
> manage utility and I see a "server" service but nothing about lanman. is
> this the service that I need to be running on my PC to export the proper
> registry key?

Hi

It is only the display name that is "Server". If you open the property sheet for
the Server service, you will see that the service name is "lanmanserver". That
is also the name of the key in registry.

--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter