How to control to run Powershell scripts?

Nikunj Patel 61 Reputation points
2022-07-20T10:59:22.46+00:00

I have 3 PowerShell script and it published in azure automation account. Now my requirement is out of 3, two scripts run parallelly and one script run only when first 2 scripts are completed. As third script dependent on first 2 scripts results. Is there any way in azure we can control the execution of power shell scripts.

Your input is greatly appreciated. Thank you in advance.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,645 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,366 questions
Windows for business Windows Server User experience PowerShell
Community Center Not monitored
0 comments No comments
{count} votes

Accepted answer
  1. Andreas Baumgarten 123.4K Reputation points MVP Volunteer Moderator
    2022-07-20T19:38:08.527+00:00

    Hi @Nikunj Patel ,

    maybe a Graphical Powershell runbook in Azure Automation is what you are looking for?

    https://learn.microsoft.com/en-us/azure/automation/automation-graphical-authoring-intro

    ----------

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

    Regards
    Andreas Baumgarten


1 additional answer

Sort by: Most helpful
  1. Maxim Sergeev 6,586 Reputation points Microsoft Employee
    2022-07-20T17:54:31.633+00:00

    If you are looking for the best solution to achieve that, Azure Functions with Powershell is better for your use-case. https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-powershell

    But if you don't want to use Runbooks Powershell Workflows or you have to use your previously created runbooks, you can enable Diagnostics Logs in Azure Automation account integrated with Log Analytics Workspace, and then to trigger an alert rule with preconfigure Action Group with enabled webhooks for other runbook.

    But once again, I would highly recommend moving to Azure Functions.

    0 comments No comments

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.