Review : Agent Installation/Policy In Azure Landscape

Ananthu Subramanian 0 Reputation points
2023-02-21T05:20:21.97+00:00

I would like to review, get suggestions on one of the solutions which we had for running script/installing agent in a huge number of subscriptions.

Runbook which loops over subscriptions and get VM details and then create a webhook to another runbook -> Another runbook which will actually run the script -> Monitor Logs from Log Analytics

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,132 questions
Azure Policy
Azure Policy
An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
799 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. tbgangav-MSFT 10,386 Reputation points
    2023-03-06T03:25:35.7866667+00:00

    Hi @Ananthu Subramanian ,

    Can you provide little more context.

    • Is your requirement to run a script (which installs an agent) remotely in set of VM's over different subscriptions?
    • What is the agent about? Wanted to know it to see if there are any direct approaches to accomplish the requirement.
    • What VM details are you getting and why?
    • What is the reason to create webhook to another runbook?

    If your requirement is to run a script (which installs an agent) remotely then may be follow one of the approaches explained here https://learn.microsoft.com/en-us/answers/questions/526820/azure-automation-running-power-shell-scripts-in-ru. Also, same runbook can be improved to work for multiple VM's across subscriptions using for loops.