Deleting Computers

Feb 28, 2011 at 9:28 PM
Edited Feb 28, 2011 at 9:29 PM

Hello all, Would appreciate some help in setting up a task sequence to delete a computer from AD. Have successfully setup the webservice to move computers between staging OU's and production OU's but would like the ability to delete the computer account at the start of the imaging process.

Have enabled the "adext.asmx" file and I am able to delete a computer account using the web page.

My step = cscript.exe %SCRIPTROOT%\ZTI_ExecuteWebservice.wsf /wsSection:RunDeleteComputer /wsProperty:DeleteComputer /wsResultName:string

Below is my customsettngs.ini section

[RunDeleteComputer]
WebService=http://deploy01/MDTWEB/adext.asmx/DeleteComputer
Parameter=Computername
Computername=string

 

I keep getting the same error

"Unexpected response from web service: 500 Internmal Server Error"

Missing Parameter: Computername

Web Service returned no data

 

Thank you for your help

Coordinator
Mar 11, 2011 at 4:24 PM

The error message says, that the parameter ComputerName has no value so it can't find the requested Computer. Make sure that the property "ComputerName" has a value. In MDT the computername is typically stored in the property OSDComputerName so you would need something like:

[RunDeleteComputer]
WebService=http://deploy01/MDTWEB/adext.asmx/DeleteComputer
Parameter=OSDComputername
OSDComputerName=ComputerName

Looks a bit yoda style but that should do it.

Regards

Maik

Nov 26, 2012 at 12:50 PM

This maybe a little irrelevant by the age of this thread but...

I was using this thread as I need to achieve the same thing, and I found that Parameter does not work for me, it has to be Parameters. Took me most of Friday to work that out.

So just in case anyone else stumbles on this and finds the same problem :-)