SCCM api or powershell code to get live patch installation update (Software center)

Syed Nasiruddins Shah Ss 1 Reputation point
2022-04-28T09:39:20.1+00:00

Hi Team,

Please help us as we are looking to get live patch updates for the windows patches installed using software center.

Do we have any SCCM api which will help us or any powershell module to get exact status of patches.

How to get to know reboot status of the machine after the patch is installed or when patch installation needs reboot.

Microsoft Configuration Manager
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Garth 5,801 Reputation points
    2022-04-29T08:31:35.793+00:00

    Personally i would query the Sql views directly, it will be fast then querying the API. https://learn.microsoft.com/en-us/mem/configmgr/develop/core/understand/sqlviews/sql-server-views-configuration-manager

    1 person found this answer helpful.

  2. Limitless Technology 39,376 Reputation points
    2022-04-28T16:43:57.163+00:00

    Hi SyedNasiruddinsShahSs-3522,

    You can get the status of specific updates using this example:

    $sudeploy = Get-CMSoftwareUpdateDeployment -Name "Patch Tuesday - Office and Edge 2020-07-15 00:11:11"
    Get-CMSoftwareUpdateDeploymentStatus -InputObject $sudeploy

    Source: https://learn.microsoft.com/en-us/powershell/module/configurationmanager/get-cmsoftwareupdatedeploymentstatus?view=sccm-ps

    Software Centre displays progress for software installs and advertisements. It does not show patch status other than Installed/Missing, so I suspect if you want to enumerate the progress status for that patch, you'll need to scrape logs to determine if the client is doing anything with each respective patch to create a calculated status message at runtime. You can read more here:

    https://learn.microsoft.com/en-us/sccm/sum/understand/software-updates-introduction#BKMK_SUMCompliance

    I hope this answers your question.

    ----------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept as answer--


  3. Kalyan Sundar 561 Reputation points
    2022-05-02T19:29:15.453+00:00

    You can also use CMPivot to get live data where you can refer quickfixEngineering -> InstalledBy

    https://www.anoopcnair.com/sccm-cmpivot-query-patches-installed-in-last-90-days-configmgr/

    0 comments No comments