ZTIExecuteWebservice - Class not defined - when running RemoveComputerFromCollection

Nov 1, 2012 at 2:48 AM
Edited Nov 1, 2012 at 2:50 AM

Hello, love the webservice and your post; thanks for the great work.

I cannot seem to get the RemoveComputerFromCollection to run in the TS.

I followed your posting here but when i call the web service to execute in the TS, it runs and i get this error:

FAILURE (Err): 506: Create object: Set oScriptClass = New ZTIExecuteWebservice - Class not defined

FAILURE ( 5400 ): Create object: Set oScriptClass = New ZTIExecuteWebservice - Class not defined

My CS.ini looks like this: 


WebService=http://myserver/Deployment_7.3/SCCM.asmx/RemoveComputerFromCollection Parameters=macAddress,UUID,CurrentOSDCollectionID,OSDComputerName

If i were to run tsenv2 to get currentOSDcollectionID it returns the collectionid as expected. Not sure what is wrong with my setup.

If i just run http://myserver/Deployment_7.3/SCCM.asmx/RemoveComputerFromCollection outside of the TS from a browser it works as expected, removing the system from the collectionID.

In my TS i have steps:

Use Toolkit Package

Gather (Gather local data and process rules)

Call webservice RemoveComputerFromCollection

Any ideas?

Nov 1, 2012 at 8:05 AM
Edited Nov 1, 2012 at 8:06 AM

Hi Fred,

Not sure if I got this right (however it's working in my production environment), but shouldn’t your CS.ini look something like this:










WebService= http://myserver/Deployment_7.3/SCCM.asmx/RemoveComputerFromCollection  






Nov 1, 2012 at 9:08 AM

Did you maybe rename the script to ZTIExecuteWebservice.wsf? In the download it's names ZTI_ExecuteWebservice.wsf. And on default MDT tries to create a class that has the same name as the script. So if you change the script name, you also need to reflect this change in the script itself. Just search for "ZTI_ExecuteWebservice" and replace all entries with your new "ZTIExecuteWebservice" name.




Nov 2, 2012 at 2:23 PM

Thanks, that was the problem, renaming the .wsf

Also, i did not have the step in the TS running the .wsf from the CS.ini package.

Eitherway, everything is working now as expected.

Thank again.