Skip to content

Collection Creation for SCCM 2012 in vbscript

Featured Replies

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 -> for example 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 -> for example 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 type of object you add as collection member

 

Have a nice day

 

Gvlaarho

Join the conversation

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

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.