sstivers Posted August 3, 2007 Share Posted August 3, 2007 I have been given the task of cleaning up an old domain as we move to active directory. I need to be able to remove machine accounts from the old domain as the machines are moved to the new AD. Any good examples? I'm sure the solution will be to use objget(). Is there a good reference for WINNT objects? I have found several examples of adding users but can not decipher all the things that can be done. I would like to be more self sufficient in this area. Thanks Link to comment Share on other sites More sharing options...
lod3n Posted August 3, 2007 Share Posted August 3, 2007 (edited) From the command prompt, logged in at a server on the domain in question: net computer \\computername /del Edited August 3, 2007 by lod3n [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
Danny35d Posted August 3, 2007 Share Posted August 3, 2007 Or you can use NETDOM to join and remove computers from the domain. AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
sstivers Posted August 3, 2007 Author Share Posted August 3, 2007 Unfortunately I do not have access to log into the domain controller directly.From the command prompt, logged in at a server on the domain in question:net computer \\computername /del Link to comment Share on other sites More sharing options...
sstivers Posted August 3, 2007 Author Share Posted August 3, 2007 Netdom is getting the machine disconnected from the domain but it is not removing the account. Am I missing something about Netdom?Or you can use NETDOM to join and remove computers from the domain. Link to comment Share on other sites More sharing options...
lod3n Posted August 3, 2007 Share Posted August 3, 2007 Unfortunately I do not have access to log into the domain controller directly.Get psexec from sysinternals, and then:psexec \\servername net computer \\computername /DELIt's still important to be logged into the domain in question on your own computer when you do this, otherwise, it will remove it remove it from your own domain. [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
Legacy99 Posted March 5, 2008 Share Posted March 5, 2008 Are you looking to clean up stale PC accounts? If you are I've got an untested script (too chicken to run it in production but the lab looks ok) that I wouldn't mind seeing if it works. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now