Jump to content


  • 0
gvlaarho

Collection creation in SCCM 2012

Question

4 answers to this question

Recommended Posts

  • 0

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.