How to check Virtual machine agent is in ready state using powershell script

Gajula, Gowtham 26 Reputation points
2022-03-22T07:43:08.78+00:00

Hi all
Is there any PowerShell command that we can run through the runbook to check the update agent state of a VM in the update management

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,277 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andreas Baumgarten 98,621 Reputation points MVP
    2022-03-22T08:15:40.317+00:00

    Hi @Gajula, Gowtham ,

    maybe this helps:

    # For Windows VMs  
    Get-AzVM | Select -ExpandProperty OSProfile | Select -ExpandProperty Windowsconfiguration   
    # For Linux VMs  
    Get-AzVM | Select -ExpandProperty OSProfile | Select -ExpandProperty Linuxconfiguration   
    

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful