~/2007/09/09/all-collections-for-specific-machine.md
All collections for specific machine
--- author: Tom Lasswell date: read: 1 min tags: [sms2003] ---
A bit of code from MyITForum.com with a report that lists all collections for a specific machine.
http://www.myitforum.com/forums/All\_Collections\_for\_a\_specific\_computer/m\_163312/tm.htm
select FCM.SiteCode as 'SMS Site',
FCM.CollectionID,
COL.Name as 'Collection'
from v_R_System SYS
join v_FullCollectionMembership FCM on FCM.ResourceID = SYS.ResourceID
join v_Collection COL on COL.CollectionID = FCM.CollectionID
where SYS.Name0 = @Computer
Prompt Query:
begin
if (@__filterwildcard = '')
SELECT DISTINCT SYS.Netbios_Name0 from v_R_System SYS WHERE SYS.Client0=1 ORDER By SYS.Netbios_Name0
else
SELECT DISTINCT SYS.Netbios_Name0 from v_R_System SYS WHERE SYS.Client0=1
and SYS.Netbios_Name0 like @__filterwildcard
ORDER By SYS.Netbios_Name0
end