I am trying to write a report where I grab data showing all server collections with maintenance windows. How I want to do this is to show only those server collections where those computers are also members of my "All Server" collection as well. So as to identify them as servers. I cannot use the OS caption like '%Server%' because some of these computers are also Windows 7, but are being used as a server role.
Here is the code I came up with, but the output is blank. Any help would be very much appreiated. Thank you very much
Select Distinct v_Collection.CollectionID as [Collection ID], v_Collection.Name as [Collection Name], v_ServiceWindow.Description as [Maintenance Window Description], v_ServiceWindow.StartTime as [Maintenance Window Start Time], v_ServiceWindow.Duration as [Maintenance Window Duration] From v_Collection Join v_ServiceWindow on v_ServiceWindow.CollectionID = v_Collection.CollectionID Join v_FullCollectionMembership on v_FullCollectionMembership.CollectionID = v_ServiceWindow.CollectionID Where v_FullCollectionMembership.Name In ( Select Distinct v_Collection.CollectionID From v_Collection Where v_Collection.CollectionID = 'XYZ' ) ORDER BY [Collection ID];