gvlaarho Posted April 29, 2012 Report post Posted April 29, 2012 Hello All, Is somebody have an idea how to create collection in SCCM 2012 (vbscript); also, how to add members to existing collection ? Thanks Quote Share this post Link to post Share on other sites More sharing options...
0 Peter van der Woude Posted April 29, 2012 Report post Posted April 29, 2012 Take a look at the ConfigMgr 2012 SDK (which is still a pre-release): http://msdn.microsoft.com/en-us/library/hh948960.aspx Quote Share this post Link to post Share on other sites More sharing options...
0 gvlaarho Posted April 30, 2012 Report post Posted April 30, 2012 Thanks you peter, I already downloaded the sdk, but there is nothing about collection creation in it. The old method for sccm 2007 doesn't work anymore, probably because of type of object (device or user) Quote Share this post Link to post Share on other sites More sharing options...
0 gvlaarho Posted May 2, 2012 Report post Posted May 2, 2012 nothing new ? Thanks Quote Share this post Link to post Share on other sites More sharing options...
0 gvlaarho Posted May 22, 2012 Report post Posted May 22, 2012 Hello ALL, In fact, it's the same way as before but as the LimitToCollection is mandatory now, we must include this one in the properties declaration of the new collection Also another new otpion is the Collection type:0=OTHER;1=USER;2=DEVICE; default=2 BUT, for the 0 option, the collection is well created but i can't find it ... In this example, i create a new user collection Set newCollection = SMSConnection.Get("SMS_Collection").SpawnInstance_() newCollection.Name = "Test User" newCollection.Comment = "Test User Collection creation automation test" newCollection.CollectionType = 0 '0=OTHER;1=USER;2=DEVICE; default=2 newCollection.LimitToCollectionID= "SMS00002" 'is mandatory now -> SMS00001 for all systems; SMS00002 For all users path=newCollection.Put_ In this example, i create a new Device collection; as the CollectionType is by default 2 (=DEVICE) this property is not necessary Set newCollection = SMSConnection.Get("SMS_Collection").SpawnInstance_() newCollection.Name = "Test Device" newCollection.Comment = "Test Device Collection creation automation test" newCollection.LimitToCollectionID= "SMS00001" 'is mandatory now -> SMS00001 for all systems; SMS00002 For all users path=newCollection.Put_ Remarq: You can assign SMS00001 (All systems) as LimitToCollectionID for a USER collection and SMS00002 (All Users) as LimitToCollectionID for a DEVICE Collection, so pay attention ... Have a nice day Gvlaarho Quote Share this post Link to post Share on other sites More sharing options...
Hello All,
Is somebody have an idea how to create collection in SCCM 2012 (vbscript); also, how to add members to existing collection ?
Thanks
Share this post
Link to post
Share on other sites