/build/static/layout/Breadcrumb_cap_w.png

Creating Collections based off Collection Membership (WQL Query)

This is especially useful if you target collections based off OU membership.

Example: 

Your environment contains the following collections.

NursesRoom101
NursesRoom102
NursesRoom103
NursesRoom104
NursesRoom105
.. so on through..
NursesRoom200

To easily create a "All Nurse Rooms" master collection, the following query would grab them all:

select
SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTE
M.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where ResourceID in (select ResourceID from
SMS_FullCollectionMembership JOIN SMS_Collection on SMS_FullCollectionMembership.CollectionID =
SMS_Collection.CollectionID where SMS_Collection.name LIKE "NursesRoom%")

If you wanted to target multiple specific collections:

select
SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTE
M.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where ResourceID in (select ResourceID from
SMS_FullCollectionMembership JOIN SMS_Collection on SMS_FullCollectionMembership.CollectionID =
SMS_Collection.CollectionID where SMS_Collection.name LIKE "NursesRoom107" OR SMS_Collection.name
LIKE "NursesRoom109" OR SMS_Collection.name LIKE "NursesRoom122" OR SMS_Collection.name
LIKE "NursesRoom145" OR SMS_Collection.name LIKE "NursesRoom147" OR SMS_Collection.name
LIKE "NursesRoom149" OR SMS_Collection.name LIKE "NursesRoom150")
Replace these made up collections with your own.

Comments

This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ