Finding enabled/disabled Task Sequences using a specific package

select
 p.packageid
, p.name
, p.description
, case (programflags & 4096) / 4096 when 1 then 'Disabled' else 'Enabled' end
, c.collectionid
, c.name
, a.advertisementid
, a.advertisementname
from v_advertisement a
inner join v_package p on p.packageid = a.packageid
inner join v_collection c on c.collectionid = a.collectionid
inner join v_tasksequencepackage tsp on tsp.packageid = p.packageid
inner join v_TaskSequencePackageReferences tspr on tspr.PackageID = tsp.PackageID
where tspr.RefPackageID = 'XXX0056A'
order by p.packageid, c.collectionid
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 )

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s