Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

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.

Posted

Unfortunately I do not have access to log into the domain controller directly.

Get psexec from sysinternals, and then:

psexec \\servername net computer \\computername /DEL

It'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]

  • 7 months later...
Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...