IT · SCCM

SQL Query for SCCM Task Sequence References.

This is a query that can be used to give you a list of all the packages that are referenced in the task sequence.  This can be useful to have a list for quick reference.  You can easily compare to task sequences, etc…

SQL Query for TS references.

select tsr.packageID, tsr.referencepackageid, tsr.referencename, tsp.packageid, tsp.name

from v_tasksequenceReferencesInfo tsr

join v_tasksequencePackage tsp On tsr.packageID = tsp.packageid

where tsr.packageid = ‘SMS00001’

Or you can go by task sequence name.

select tsr.packageID, tsr.referencepackageid, tsr.referencename, tsp.packageid, tsp.name

from v_tasksequenceReferencesInfo tsr

join v_tasksequencePackage tsp On tsr.packageID = tsp.packageid

where tsp.name =  ‘Task Sequence Name’

To find the task sequence packageID

select tsp.packageid, tsp.name

from v_tasksequencepackage tsp

where tsp.name = ‘Task Sequence Name’

 

-TG

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s