I need some help automating a process to add computers to SCCM 2012 and adding a variable to them.
I'll also probably want to create a collection and add the machines to it at some point as well.
I've gotten as far as...
Public Function connect(sccmserver, sitecode)
Dim obj = CreateObject("WbemScripting.SWbemLocator")
Dim sccm = obj.ConnectServer(sccmserver, "root\sms\site_" & sitecode)
And this works OK - sccm is a comobject though at this point and its not obvious (to me anyway) how I'd go about exposing the functions and methods that are available here.
SO how would I go about adding a machine and is there any documentation available that can help me through the rest of the steps I want to carry out.