Tuesday 5 July 2011

SCCM - SQL Report to show Maintance Windows for a Collection of system

Select fcm.Name,fcm.CollectionID as [Member of Collection], sw.Name as 'CEPSWName', sw.Description, sw.StartTime, sw.Duration as 'DurationMinutes', sw.IsGMT as 'StartTimeIsGMT', sw.IsEnabled as 'CEPSWEnabled',case when sw.ServiceWindowType=5 then '*' else ' ' end as 'OSDServiceWindow'
from v_ServiceWindow sw
join v_FullCollectionMembership fcm on sw.CollectionID = fcm.CollectionID
where fcm.name in (select  v_FullCollectionMembership.name from  v_FullCollectionMembership where  v_FullCollectionMembership.collectionid='SMS00001') and isnull(fcm.IsObsolete, 0)= 0

No comments:

Post a Comment