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

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

Related Posts Plugin for WordPress, Blogger...

Got anything to say? Go ahead and leave a comment!