Managing software updates and creation of custom reports in ConfigMgr is OCEAN. You have so much data to visualize based on your needs.
One of the very common requirements or reports is, find out the missing/required updates of a device that is managed by SCCM.
If you have not moved the device management solution to Microsoft Intune, especially windows updates and you are still with ConfigMgr, then this post is for you.
I have written a couple of blog posts on finding the missing/required updates for a specific device in SCCM are listed below for your reference.
likewise, you can create many reports, but it is not always convenient when you need to quickly check the required updates for a specific device within the SCCM console.
I have started reading about the creation of custom right-click tools (Neilp,Ryan) and created a custom tool, integrated with SCCM console to make things easy for you to find the required updates with one click.
The output will look like the following when you right-click on a device in the console, click on required updates, you will see a list of all required updates with a few columns.
How to configure/install this right-click tools extension?
Download the files from Github.
Extract the files, you will find required.updates.ps1, and folder.
Edit Required.updates.xml located in folder ed9dee86-eadd-4ac8-82a1-7234a4646e62
You need to edit line 19 for the location of the PowerShell script. You can copy the Required.updates.ps1 to your ConfigMgr admin location or anywhere that you can launch later from the console.
"G:\Program Files\Microsoft Configuration Manager\AdminConsole\bin\Required.updates.ps1"
I copied it to the admin console install folder (bin).
Now, copy the folder (ed9dee86-eadd-4ac8-82a1-7234a4646e62) to XmlStorage\Extensions\Actions folder.
In my case, the actions folder is in G:\Program Files\Microsoft Configuration Manager\AdminConsole\XmlStorage\Extensions\Actions
Close the SCCM console (in case it is opened already) and launch the console again.
Right-click on any device, you will see the required updates option, click on it, it shows the missing updates.
You can sort the columns available in the grid window by title, superseded, expired, date posted.
When the updates are superseded, they appear in orange color, if expired, they appear in red. If updates are expired and also superseded, they still appear in orange color.
I know the information that is presented in the RCT tool for required updates is limited and there is a scope to add a lot more information such as is the update targeted to the device, which SUG groups, the update is a member of, etc.
Due to the information available in the SMS provider and the complexity of the code, I have put it aside for now.
Limitations of this RCT tool and you may see empty results if the device meets the following.
1. Device has no SCCM Agent/not healthy or updates scan is not successful.
2. The device is co-managed and the windows update workload is shifted to Intune.
In case you are looking for a SQL query to gather additional information that I could not represent in the RCT solution, is given below.
The following is the SQL code to get the required updates of a device.
declare @PC nvarchar (255);set @PC='CMCB-CL01'
select ui.Title, ui.articleid [ArticleID],
UpdateClassification=cls.CategoryInstanceName,
Required=(case when ucs.Status=2 then 'Yes' else 'No' end),
Targeted=(case when ctm.ResourceID is not null then 'Yes' else 'No' end),
ui.InfoURL as InformationURL,
ui.DateLastModified[Date Posted] ,
case when ui.IsSuperseded=1 then 'Yes' else 'No' end as 'Superseded',
case when ui.IsExpired=1 then 'Yes' else 'No' end as 'Expired'
from V_UpdateComplianceStatus ucs
join v_UpdateInfo ui on ui.CI_ID=ucs.CI_ID
left join v_CITargetedMachines ctm on ctm.CI_ID=ucs.CI_ID and ctm. ResourceID = ucs.ResourceID
join v_CICategoryInfo_All vnd on vnd.CI_ID=ui.CI_ID and vnd.CategoryTypeName='Company'
join v_CICategoryInfo_All cls on cls.CI_ID=ui.CI_ID and cls.CategoryTypeName='UpdateClassification'
JOIN dbo.v_R_System AS vrs ON vrs.ResourceID = ucs.ResourceID
WHERE ucs.Status=2 and vrs.Name0=@PC
order by 1
Hope you find this article useful!