您好,
感谢您的回复。
尝试以下脚本。
Sub RemoveComputer( strDomain, strComputer )
Dim objDC
Set objDC = getobject("WinNT://" & strDomain )
objDC.Delete( "Computer", strComputer )
End Sub
Dim strDomain, strComputer
Do
strDomain = inputbox( "Please enter a domainname", "Input" )
Loop until strDomain <> ""
Do
strComputer = inputbox( "Please enter the name of the computer to be removed from the domain", "Input" )
Loop until strComputer <> ""
RemoveComputer strDomain, strComputer
WScript.Echo "Done."
希望以上信息对您有所帮助。
再次感谢你的理解与支持。
最好的祝福,
Otto
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.