Help with Webservice call Addcomputertocollection

Sep 28, 2010 at 8:33 AM
Edited Feb 7, 2011 at 10:47 AM

I'm trying to call the webservice AddComputerToCollection from a SCCM sequence and i'm having some issues.

 

I'm not really sure how to edit the CS.ini or the vbscript that does the call in the task sequence can some help please.  in particular the way the collection ID is passed to the webservice

[AddComputerToCollection]
WebService=http://server/DeploymentWebServices/sccm.asmx/AddComputerToCollection
Parameters=macAddress,UUID,CollectionID,ComputerName
CollectionID=szCollectionID

#############################

 

Function ZTIProcess()

 Dim oService, oXML, sResult

 iRetVal = Success

 oLogging.CreateEntry "Add Computer to Col1ection: Processing AddComputerToCollection", LogTypeInfo
 

 ' Create the web service instance
 Set oService = new WebService
 oEnvironment.item("szCollectionID") = "LIV00112"
 oService.IniFile = "customsettings.ini"
 oService.SectionName = "AddComputerToCollection"

 ' Make the web service call
 Set oXML = oService.Query
 If oXML is Nothing then
  oLogging.CreateEntry "Unable to call AddComputerToCollection web service.", LogTypeWarning
 Else
  oXML.setProperty "SelectionNamespaces", "xmlns:mk='http://maikkoster.com/Deployment'"
  sResult = UCase(oXML.SelectSingleNode("mk:boolean").Text)
 End if 

 ZTIProcess = Success

End Function

 

Sep 29, 2010 at 9:46 AM

It OK I sorted it Out!