search cancel

How can I view a list of default software update policies a computer is a member of?

book

Article ID: 163744

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

If you have many cloned default software update policies, how can you find out which policies computers are a part of?

Resolution

You can use the following SQL query to report on this:

This query will give you a list of all computers and what software update policy they are in:
 
select distinct vc.Name as 'Computer Name', i.Name as Policy
from ItemActive ia
         join ItemAppliesTo iat on iat.ItemGuid = ia.Guid
         join ResourceTargetMembershipCache rtcc on rtcc.ResourceTargetGuid = iat.ResourceTargetGuid
         join vRM_Computer_Item vc on vc.Guid = rtcc.ResourceGuid
         join Item i on i.Guid = ia.Guid
where ia.Enabled = 1
         and
         ia.Guid in (select Guid from ItemClass where ClassGuid = '5E5BDE22-C290-4A94-A36C-C5076DA6D565')--Altiris.PatchManagementCore.Policies.PatchAgentPolicy
order by vc.Name, i.Name

You can refine the query to include only a list of computers using something like the following.  I have added the "and vc.name in ..." section.  That is where you would add your list of computers to just report on them.
 
select distinct vc.Name as 'Computer Name', i.Name as Policy
from ItemActive ia
         join ItemAppliesTo iat on iat.ItemGuid = ia.Guid
         join ResourceTargetMembershipCache rtcc on rtcc.ResourceTargetGuid = iat.ResourceTargetGuid
         join vRM_Computer_Item vc on vc.Guid = rtcc.ResourceGuid
         join Item i on i.Guid = ia.Guid
where ia.Enabled = 1
         and
         ia.Guid in (select Guid from ItemClass where ClassGuid = '5E5BDE22-C290-4A94-A36C-C5076DA6D565')--Altiris.PatchManagementCore.Policies.PatchAgentPolicy
         and vc.Name in ('CL-w10x64-1','CL-W2K12R2-1','CL-W2K8R2-01')
order by vc.Name, i.Name