CM12 Collection prompt example

For full details see: http://www.myitforum.com/forums/tm.aspx?high=&m=238953&mpage=1#239186

SELECT distinct 
    sys1.Name0, 
    csys.Model0, 
    csys.Manufacturer0, 
    os.Caption0, 
    os.CSDVersion0, 
    BIOS.SerialNumber0, 
    sys1.description0,  
    REPLACE((SELECT IPAddress0 + ', ' FROM v_GS_NETWORK_ADAPTER_CONFIGUR WHERE resourceID = sys1.resourceID AND ipenabled0 = 1 FOR XML PATH('') )+'..',', ..','') AS [IP Addresses]
FROM 
    v_r_SYSTEM sys1 
    join v_GS_COMPUTER_SYSTEM csys on csys.resourceid=sys1.resourceid 
    join v_GS_OPERATING_SYSTEM os on os.resourceid=sys1.resourceid 
    join v_GS_PC_BIOS bios on bios.resourceid=sys1.resourceid 
    JOIN v_FullCollectionMembership fcm on fcm.resourceid=sys1.resourceid  
WHERE  
    fcm.Collectionid= 'SMS00001'
ORDER BY 
    sys1.Name0 

Leave a Reply

Your email address will not be published. Required fields are marked *