|
Patch yapılmamış tüm makinaların listesini verir sql querysi
Gönderen : admin Kategori : SMS Saat : 11:47:48
Skor : 0 |
Azalt (0) | Yükselt (0) | Focused: 1109 | Permalink | Digg It
Report Category Software Update - Compliance Report Name All Computers where a software update is applicable Report Comment This report lists all targeted computers within the collection specified for which a software update is applicable but not yet installed.
Sql Query
declare @LocaleID int
set @Product = (case when IsNULL(@Product,'')='' then '%' else @Product end)
set @LocaleID = (case when IsNULL(@Locale,'')='' then -1 else convert(int,@Locale) end)
select sys.Netbios_Name0, ps.Product,ps.QNumbers, ps.LocaleID, sys.User_Domain0, sys.User_Name0, fcm.SiteCode, ws.LastHWScan,
DATEADD(ss,@__timezoneoffset,ps.LastStatusTime) as LastStatusTime,
ps.LastStateName, ps.UniqueUpdateID as C086
from v_R_System sys
join v_FullCollectionMembership fcm on sys.ResourceID=fcm.ResourceID
join v_GS_WORKSTATION_STATUS ws on sys.ResourceID=ws.ResourceID
join v_GS_PatchStatusEx ps on sys.ResourceID=ps.ResourceID
join v_ApplicableUpdatesSummaryEx summ on
ps.UpdateID=summ.UpdateID
where fcm.CollectionID = @CollID and ps.LastState != 105
and summ.Type= @Type and
ps.Product like @Product and
(ps.LocaleID=@LocaleID or @LocaleID=-1)
|