Azure Automation Graphical Powershell Runbook Edit Multiple Code Activities

Jesus Chao 141 Reputation points
2022-03-04T15:23:45.567+00:00

I am in the process of writing multiple Graphical PowerShell runbooks in Azure Automation. Within each Graphical PS Runbook, I am either using custom cmdlets/functions that I created that I have imported into Azure Automation as a module or written using the Code Activity.

My issue is, once I add one of my custom cmdlets/function into the canvas and set all the parameters, if I upload an update of my custom module, I have to delete the activity in the canvas in order to update the activities parameters if I add or change the parameters within the cmdlet/function. If I have multiple Graphical PS Runbooks that use these functions, I will have to go into each one to make the modification which can be very tedious.

I thought about using the code activity instead and then referencing the cmdlet within the Activity Logic - however - I still have the same issue.

In Microsoft System Center Orchestrator, if I want to update a Run .Net script, I could modify multiple code activities by modifying the SQL database with a query.

My question is, is there a way to modify multiple activities in multiple Graphic Runbooks so that if I make updates to my custom module, I can easily update all the code activities or the parameters within a cmdlet inserted into a canvas directly.

Thanks

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,195 questions
0 comments No comments
{count} votes

Accepted answer
  1. AnuragSingh-MSFT 21,246 Reputation points
    2022-03-09T05:23:30.067+00:00

    Hi @Jesus Chao ,

    Welcome to Microsoft Q&A! Thanks for posting the question.

    I understand your question about updating the graphical runbooks when custom cmdlets get updated with parameter type or parameter count. There is no other way to update these runbooks when the used cmdlet's param gets changed. Changing param would require corresponding change in the activity connection in the runbook which will have to map according to the update. You can think of it being like updating a method/function in your code/script. When that happens, other functions/methods or part of code calling that updated method will have to adjust accordingly to match the parameters.

    In the case of System Center Orchestrator, you have access to the Orchestrator Database where you may modify the activities and linking (which requires a bit of understanding of the Orchestrator DB schema). Since we do not have access to such a store in Azure Automation, it is not going to be possible.

    Please let me know if you have any questions.

    ---
    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.


0 additional answers

Sort by: Most helpful