Using a form button with VBScript to delete a computer account in Active Directory
Posted on 2003-11-25
I have a VBScript called on a web page to delete a computer from our Active Directory site. The script portion works great in a stand-alone VBS file. But no such luck using this method from a web page though. Any ideas? FYI Permission is not the issue... running both from same machine.
MsgBox "Delete command was accepted."
strComputer = "TESTCPU1"
Domain = "MIDWEST"
Set objComputer = GetObject("LDAP://CN=" & strComputer & ",CN=Computers,DC=" & Domain & ",DC=com")
<form name="frm" method="post">
<input type="submit" name="Submit" value="Delete from Active Directory">