Page 1 of 1 1
Topic Options
#151663 - 2005-11-17 12:20 PM Remove Computer from NT Domain
ClientMaster Offline
Fresh Scripter

Registered: 2005-01-19
Posts: 46
Loc: Tokyo, Japan
Hi,
I need a script that will remove the current pc from a NT domain and put it into a workgroup.

Is there anything out there that will do this?

The OS is 2K.

Top
#151664 - 2005-11-17 07:09 PM Re: Remove Computer from NT Domain
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
NETDOM utility from Microsoft.
Top
#151665 - 2005-11-18 12:41 AM Re: Remove Computer from NT Domain
ClientMaster Offline
Fresh Scripter

Registered: 2005-01-19
Posts: 46
Loc: Tokyo, Japan
I know that I need to use netdom, but I can`t seem to get the right version and the right command line..
I was hoping that maybe someone might be able to help..

Top
#151666 - 2005-11-18 12:46 AM Re: Remove Computer from NT Domain
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Well the version you would want is 5 or newer and there are lots of code examples on this board.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#151667 - 2005-11-18 01:08 AM Re: Remove Computer from NT Domain
ClientMaster Offline
Fresh Scripter

Registered: 2005-01-19
Posts: 46
Loc: Tokyo, Japan
Does NETDOM have to be run from the domain controller, or can it be run on the PC you are trying to remove from the domain?
Top
#151668 - 2005-11-18 01:24 AM Re: Remove Computer from NT Domain
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You run it at the computer the script is running on which does not have to be the computer being removed.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#151669 - 2005-11-18 01:27 AM Re: Remove Computer from NT Domain
ClientMaster Offline
Fresh Scripter

Registered: 2005-01-19
Posts: 46
Loc: Tokyo, Japan
Can it be on the computer I am trying to remove?

I tired to use the following command, but it didn`t work.

netdom remove /d:mydomain mywksta /ud:mydomain\admin /pd:password

Top
#151670 - 2005-11-18 01:33 AM Re: Remove Computer from NT Domain
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I have only used it from an admin script where the client PCs were not the ones running the script.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#151671 - 2005-11-18 01:40 AM Re: Remove Computer from NT Domain
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
That said, I know there have been several scripts posted that use NETDOM to join the computer running the script to a domain so I'm pretty sure the inverse should be possible.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#151672 - 2005-11-18 03:08 AM Re: Remove Computer from NT Domain
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Yes, should work fine.
NETDOM5 5.2.3790.1830
5.2.3790.1830 (srv03_sp1_rtm.050324-1447)
 
 
Quote:


NETDOM REMOVE machine /Domain:domain [/UserD:user]
[/PasswordD:[password | *]]
[UserO:user] [/PasswordO:[password | *]]
[/REBoot[:Time in seconds]]
  
NETDOM REMOVE Removes a workstation or server from the domain.
  
machine is the name of the computer to be removed
 
/Domain Specifies the domain in which to remove the machine
 
/UserD User account used to make the connection with the domain
specified by the /Domain argument
 
/PasswordD Password of the user account specified by /UserD. A * means
to prompt for the password
 
/UserO User account used to make the connection with the machine to be
removed
 
/PasswordO Password of the user account specified By /UserO. A * means
to prompt for the password
 
/REBoot Specifies that the machine should be shutdown and automatically
rebooted after the Remove has completed. The number of seconds
before automatic shutdown can also be provided. Default is
30 seconds
 




 
 
The latest NETDOM 5.2.3790.1830 tool can be found here
 
Windows Server 2003 Service Pack 1 32-bit Support Tools

 

Top
#151673 - 2005-11-18 03:43 AM Re: Remove Computer from NT Domain
ClientMaster Offline
Fresh Scripter

Registered: 2005-01-19
Posts: 46
Loc: Tokyo, Japan
Thank you very much.

When I ran the command, I received a can`t find entry point error..

Any idea why this might appear?

Top
#151674 - 2005-11-18 09:55 AM Re: Remove Computer from NT Domain
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
You're probably running a version of NETDOM which is intended for a different operating system.

For example you are running a Windows 2000 or higher version of NETDOM on an NT workstation.

The error is caused because the supporting DLLs or APIs are not available on your operating system

Top
#151675 - 2005-11-18 09:58 AM Re: Remove Computer from NT Domain
ClientMaster Offline
Fresh Scripter

Registered: 2005-01-19
Posts: 46
Loc: Tokyo, Japan
I used the exact version and commands as the last post from NTDOC suggested.
Top
#151676 - 2005-11-18 10:29 AM Re: Remove Computer from NT Domain
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
But that is only supported on XP/2003 if you run it on 2000 it's not supported. There is a version for 2000 but I don't know if it supports the remove or not.

I can check on it tomorrow night.

Top
#151677 - 2005-11-18 03:11 PM Re: Remove Computer from NT Domain
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
The version I used to rename all my W2K machines is 5.2.3687.0 (dnsrv.020927-1754). It came in the forestrecovery.exe from MS.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#151678 - 2005-11-18 10:54 PM Re: Remove Computer from NT Domain
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
The one I referenced will work AGAINST any version NT4/2000/XP/2003/(Vista I'm sure) but it just won't run on 2000 desktop, thus if you're trying to do it FROM a 2000 desktop then you will need the version mentioned by Les.

Not sure why you can't run it remotely though.

Top
#151679 - 2005-11-18 11:06 PM Re: Remove Computer from NT Domain
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I think he is running a suicide script.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 962 anonymous users online.
Newest Members
StuTheCoder, M_Moore, BeeEm, min_seow, Audio
17884 Registered Users

Generated in 0.038 seconds in which 0.015 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org