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

Gajula, Gowtham 26 Reputation points

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

    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)

    Andreas Baumgarten

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful