Monthly Patching issue windows 10 device (1803) we have 68K system in the environment

Question

Hello Team,

1.In our Sccm environment we have 68k Machine 80 % systems its giving same status like NA Comp and Missing 25% of systems end of the month also its giving the stats as unknown.
2.we have deployed the monthly patches 1803 build we have 68 K machines But when we are pulling compliance date From DB we are getting 48 K Machines only.
3.when we check the all systems last logon time, Last policy request and on line status its shows current date only.

Please help me your suggestion and what steps I need to perform to get compliance up to 95%.

solved 0
Naga Raju 7 months 2 Answers 136 views Beginner 0

Answers ( 2 )

  1. Hi,

    Your software update compliance deployment report is based on sccm client health.

    Use below SQL query to get all status in single sheet and you can comes to know overall status of sccm agent client health.

    —————————————————————————————-
    Select distinct
    –Vrs.ResourceID as ‘ResourceID’,
    Vrs.name0 as ‘MachineName’,
    Upper(Left(Vrs.name0,2)) as ‘Country’,
    Vrs.operatingSystem0 as ‘Operating System’,
    case when cdr.IsClient =1 then ‘Yes’ else ‘No’ end as ‘SCCMClient Status’,
    case when cdr.IsActive=1 then ‘Active’ else ‘InActive’ end as ‘SCCMHealth Status’,
    –Soe.CurrentBuildVersion0 as ‘SOE Version’,
    WSLN.Value as ‘Build Version’,
    Vos.CSDVersion0 as ‘Service Pack’,
    Vos.Version0 as ‘OS Version’,
    Vcs.SystemType0 as ‘OS Type’,
    –Vrs.DESCRIPTION0 as ‘Description’,
    CASE
    WHEN Vse.ChassisTypes0 in (‘1’) THEN ‘Virtual’
    WHEN Vse.ChassisTypes0 in (‘8′,’9′,’10’,’12’,’14’) THEN ‘Notebook’
    WHEN Vse.ChassisTypes0 in (‘2′,’3′,’4′,’5′,’6′,’7′,’13’,’15’,’16’,’35’) THEN ‘Desktop’
    WHEN Vse.ChassisTypes0 in (’11’,’17’,’31’,’32’) THEN ‘Tablet’
    WHEN Vse.ChassisTypes0 in (’23’) THEN ‘RackMount’
    when Vse.ChassisTypes0 is Null Then ‘NA’
    Else ‘Others’ END as ‘ChassisType’,
    Vcs.Manufacturer0 as ‘Manufacturer’,
    CASE WHEN CAST(Vcs.Manufacturer0 as NVarchar(255)) LIKE ‘%LENOVO%’
    THEN CAST(Vcsp.Version0 as NVarchar(255)) ELSE CAST(Vcs.Model0 as NVarchar(255)) END AS ‘Model’,
    cdr.MACAddress as ‘MACAddress’,
    Seu.SerialNumber0 as ‘SerialNumber’,
    Vse.SMBIOSAssetTag0 as ‘AssetTag’,
    convert(varchar,VPM.TOTALPHYSICALMEMORY0 / (1024)/1000 ) as ‘Total_RAM_Size_GB’,
    (select sum(Size0)/1024 from v_GS_LOGICAL_DISK where ResourceID = vrs.ResourceID) as ‘Total_HDD_Size_GB’,
    case when cdr.clientstate=0 then ‘No Pending Reboot’ else ‘Pending Reboot’ end as ‘Reboot Status’,
    case when cdr.cnisonline=1 then ‘Online’ else ‘Offline’ end as ‘Current Online Status’,
    Cdr.ClientVersion as ‘SCCM Version’,
    Cdr.cnlastonlinetime as ‘Last Online Status’,
    Cdr.lastpolicyrequest as ‘Last Policy Request’,
    cdr.LastDDR as ‘Last Heartbeat Scan’,
    Cdr.LastHardwareScan as ‘Last HW Scan’,
    cdr.LastSoftwareScan as ‘Last SW Scan’,
    Vus.LastScanTime as ‘Last SUP Scan’,
    Vus.lasterrorcode as ‘LastSUPScanStatus’,
    Vus.lastscanpackagelocation as ‘SUPLocationPath’,
    cdr.LastMPServerName as ‘LastMPServerName’,
    cdr.LastStatusMessage as ‘Last Status Msg’,
    (select MAX(AgentTime) from v_AgentDiscoveries where AgentName = ‘SMS_AD_SYSTEM_DISCOVERY_AGENT’ and ResourceID = Vrs.ResourceID) as ‘Last AD SysDisc Scan’,
    cdr.ADLastLogonTime as ‘Last AD Logon Stamp’,
    DateDiff(D, Convert(VarChar, Cdr.cnlastonlinetime,100), GetDate()) as ‘Last Online Status(Days)’,
    DateDiff(D, Convert(VarChar, Cdr.lastpolicyrequest,100), GetDate()) as ‘Last Policy Request(Days)’,
    DateDiff(D, Convert(VarChar, Cdr.LastDDR,100), GetDate()) as ‘Last Heartbeat Scan(Days)’,
    DateDiff(D, Convert(VarChar, Cdr.LastHardwareScan,100), GetDate()) as ‘Last HW Scan(Days)’,
    DateDiff(D, Convert(VarChar, Cdr.LastSoftwareScan,100), GetDate()) as ‘Last SW Scan(Days)’,
    DateDiff(D, Convert(VarChar, Vus.LastScanTime,100), GetDate()) as ‘Last SUP Scan(Days)’,
    DateDiff(D, Convert(VarChar, (select MAX(AgentTime) from v_AgentDiscoveries where AgentName = ‘SMS_AD_SYSTEM_DISCOVERY_AGENT’ and ResourceID = Vrs.ResourceID),100), GetDate()) as ‘Last AD SysDisc Scan (Days)’,
    DateDiff(D, Convert(VarChar, cdr.ADLastLogonTime,100), GetDate()) as ‘Last ADLogon Stamp (Days)’,
    FORMAT(Vos.InstallDate0, ‘MM/dd/yyyy HH:mm:ss’) as ‘OS Install Date’,
    DateDiff(D, Vos.InstallDate0, GetDate()) ‘OS Install Date (Days)’,
    FORMAT(Vos.LastBootUpTime0, ‘MM/dd/yyyy HH:mm:ss’) as ‘LastBootUpDate’,
    DateDiff(D, Convert(VarChar, Vos.LastBootUpTime0,100), GetDate()) as ‘Last BootUp Date (Days)’,
    –Case When App.ARPDisplayName0 like ‘%Symantec Endpoint Protection%’ Then ‘Installed’ Else ‘NotInstalled’ End as ‘Application Status (AV)’,
    Tpm.PhysicalPresenceVersionInfo0 as ‘TPMVersion’,
    Vpb.Name0 as ‘BiosName’,
    Vpb.BIOSVersion0 as ‘BiosVersion’,
    Vp.Name0 as ‘ProcessorName’,
    Vp.NumberOfCores0 as ‘NumberOfCores’,
    Vp.NumberOfLogicalProcessors0 as ‘NumberOfLogicalProcessors’,
    Vra.SMS_Assigned_Sites0 as ‘AssignedSite’,
    cdr.ADSiteName as ‘ADSiteName’,
    Vrs.Full_Domain_Name0 as ‘FullDomainName’,
    (Vrs.Name0 + ‘.’ + Vrs.Full_Domain_Name0) as ‘FQDN’,
    Vrs.USER_DOMAIN0 as ‘UserDomain’,
    Vrs.USER_NAME0 as ‘LastLogonID’,
    Vcud.TOPCONSOLEUSER00 as ‘TopConsoleUserID’,
    CASE
    WHEN Vcud.TOPCONSOLEUSER00 IS NOT NULL THEN SUBSTRING(Vcud.TOPCONSOLEUSER00,CHARINDEX(‘’,Vcud.TOPCONSOLEUSER00)+1,CHARINDEX(‘’,Vcud.TOPCONSOLEUSER00)+10)
    ELSE Vrs.USER_NAME0
    END as ‘LogonID’,
    Vru.Mail0 as ‘EMailID’,
    Vrs.canonicalName0 as ‘OUInfo’
    FROM v_R_System as Vrs
    LEFT JOIN V_GS_PC_BIOS as Vpb ON Vpb.ResourceID = Vrs.ResourceID
    LEFT JOIN V_GS_SYSTEM_ENCLOSURE_UNIQUE as Seu ON Seu.ResourceID = Vrs.ResourceID
    LEFT JOIN V_GS_X86_PC_MEMORY as Vpm ON VPM.ResourceID = Vrs.ResourceID
    LEFT JOIN V_GS_COMPUTER_SYSTEM as Vcs ON VCS.ResourceID = Vrs.ResourceID
    LEFT JOIN V_GS_TPM as Tpm ON tpm.ResourceID = Vrs.ResourceID
    LEFT JOIN SYSTEM_CONSOLE_USAGE_DATA as Vcud ON Vcud.MachineID = Vrs.ResourceID
    LEFT JOIN V_GS_COMPUTER_SYSTEM_PRODUCT Vcsp ON Vcsp.ResourceID = Vrs.ResourceID
    LEFT JOIN V_GS_SYSTEM_ENCLOSURE as Vse ON Vse.ResourceID = Vrs.ResourceID
    LEFT JOIN V_GS_OPERATING_SYSTEM as Vos ON Vos.ResourceID = Vrs.ResourceID
    LEFT JOIN v_UpdateScanStatus as Vus ON Vus.ResourceID = Vrs.ResourceID
    LEFT JOIN V_GS_LOGICAL_DISK as Vgl ON Vgl.ResourceID = Vrs.ResourceID
    LEFT JOIN V_GS_PROCESSOR as Vp ON Vp.ResourceID = Vrs.ResourceID
    LEFT JOIN v_RA_System_SMSAssignedSites as Vra ON Vra.ResourceID = VRS.ResourceID
    LEFT JOIN v_R_User as Vru ON Vru.User_Name0 = Vrs.User_Name0
    LEFT JOIN fn_GetWindowsServicingStates() as WSS on WSS.Build = Vos.Version0 and WSS.Branch = Vrs.OSBranch01
    LEFT JOIN fn_GetWindowsServicingLocalizedNames() as WSLN On WSS.Name = WSLN.Name
    LEFT JOIN System_MAC_Addres_ARR as Mac ON Mac.ItemKey = Vrs.ResourceID
    –LEFT JOIN V_GS_SOE_640 as Soe ON Soe.ResourceID = Vrs.ResourceID
    LEFT JOIN V_GS_INSTALLED_SOFTWARE as App ON App.ResourceID = Vrs.ResourceID
    LEFT JOIN V_CombinedDeviceResources as Cdr ON Cdr.MachineID = Vrs.ResourceID
    INNER JOIN V_FullCollectionMembership_Valid as Col ON Col.ResourceID = Vrs.ResourceID
    WHERE Col.CollectionID = ‘SMS00001’
    and Vrs.Active0 = 1 and Vrs.Obsolete0 = 0 and Vrs.Decommissioned0 = 0
    order by vrs.name0
    —————————————————————————–

    Best answer
  2. Hello – I think Hareesh has a great script to get the actual status out using a PowerShell

    Do you want to try this? https://www.anoopcnair.com/powershell-script-patch-installation-status/

    BTW, Unknown status is because the scan is not completed successfully. Scanagent.log for the details

Leave an answer

Sorry, you do not have a permission to answer to this question .