how to find Azure VM patching report using some query which will show latest patch , missing patches ,last patch detail using powershell for machine mentioned in a csv file

Azure-learning 56 Reputation points
2022-07-21T16:22:20.16+00:00

how to find Azure VM patching report using some query which will show latest patch , missing patches ,last patch detail using powershell for machine mentioned in a csv file.

I need to write a powershell script where i can mention vm machine patching detail query and machine names it will take from a file

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,033 questions
Windows for business | Windows Server | User experience | PowerShell
{count} votes

1 answer

Sort by: Most helpful
  1. tbgangav-MSFT 10,426 Reputation points Moderator
    2022-07-28T06:22:12.35+00:00

    Hi @NehaBameta-3476,

    As mentioned by @Maxim Sergeev , the recommended or new unified service for the managing and governing updates for all the machines is Update Management Center. If you need to query the Azure Resource Graph periodically then you may run Azure Resource Graph queries in an Azure Logic App as explained here.

    If you are looking for a manual way to pull patching data from a VM via a PowerShell script then come up with general PowerShell script to get patch details and once run it inside the VM manually to check if it pulls required data or not and then have that PowerShell script as an Azure Automation runbook and remotely execute it in the required VM as explained here / here and then forward runbook logs to log analytics workspace as explained here.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.