RSS

How can I use a script to delete a computer from a domain?

18 Feb

The following code will delete the passed computer name (e.g., “delme”) from the alibutt domain.

Dim objDC
Dim strComputer, strDomain
strComputer = “delme”
strDomain = “alibutt”
Set objDC = getobject(“WinNT://” & strDomain )
objDC.Delete “Computer”, strComputer

 
Leave a comment

Posted by on February 18, 2006 in General, Scripting, Windows 2000, Windows 2003, Windows XP

 

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.