If you have many cloned Default Software Update policies, how can you find out which policies computers are a part of?
ITMS 8.x
The following SQL queries can be manually run to provide the needed information:
--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 above to include only a list of computers using something like the following. The "and vc.name in ..." section was added to all you to add your list of computers to just report on them if needed.
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 ('computer-1','computer-2','server-01')
order by vc.Name, i.Name