Quantcast
Channel: Symantec Connect - Client Management Suite - Discussions
Viewing all articles
Browse latest Browse all 2021

SQL query that list Software Delivery Policy and associated Target(s) with Target Count

$
0
0
I do not need a solution (just sharing information)

I saw an early post in the Client Managment Suite Forum titled as "SQL query to list computers associated to policy" I had a similar need but needed a query of Software Delivery Policy and assoicated Target(s).

The below SQL T-SQL query lists software policy, status, Target(s) and Target count and etc. Hopefully someone will find usefully. 

select
    case when ia.Enabled = 1 then 'Yes' else 'No' end [Active]
    ,swpol.name as [Software Delivery Policy]
    --,swpol.Description
    ,tgt.name as [Target]
    ,TgtCnt.[Target Count]
    ,swpol.CreatedBy [Owner/Creator]
    ,swpol.ModifiedDate [Apply Date]
from ItemAppliesTo Iat
join vitem swpol on swpol.Guid = iat.ItemGuid  and swpol.ClassGuid = '2D3A170E-5028-4570-BA0C-3DB775CB8BDE'    -- software Policy classguid 
left join ItemActive IA on ia.Guid = swpol.Guid                                                                      -- is policy active
join vitem tgt on tgt.Guid = iat.ResourceTargetGuid and tgt.ClassGuid = 'D1D31520-C3AE-471D-BE99-D0FF1221BBCA' -- Target class guid
left join (
    select ResourceTargetGuid, count(*) [Target Count] 
    from ResourceTargetMembershipCache
    group by ResourceTargetGuid
) TgtCnt on TgtCnt.ResourceTargetGuid = iat.ResourceTargetGuid
where swpol.Name like 'tpm%'

Regards :) 

0

Viewing all articles
Browse latest Browse all 2021

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>