Skip to content

This script is intended to be run as a part of Update Management Pre/Post scripts. This script will run an Azure Automation runbook via a hybrid worker, allowing for local execution of a script. It requires a System Managed Identity and a hybrid worker configured on the machine.

License

Notifications You must be signed in to change notification settings

azureautomation/update-management-run-script-locally

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Update Management - Run Script Locally

This script is intended to be run as a part of Update Management Pre/Post scripts.  This script will run an Azure Automation runbook via a hybrid worker, allowing for local execution of a script. 

It requires a hybrid worker configured on the machine.

UpdateManagement-HybridWorker.ps1 uses Az cmdlets and System Managed Identity.

Due to a known issue in pre/post deployment scripts where objects and arrays are not able to be passed as parameters, this script can only execute against a single hybrid worker group. You can modify the script if you have a well-known list of hybrid workers you wish to execute against per deployment. 

This script takes in the name of another Azure Automation runbook, which will run in the context of the hybrid worker. For example, if you wanted to stop a service, you could publish a new Azure Automation runbook named 'StartMyService' that just consists of:

 

 

 

 Start-Service -Name 'Fax'

And pass the name of that Azure Automation runbook into this script, e.g. 'StartMyService' . 

 

 

 

 

TechNet gallery is retiring! This script was migrated from TechNet script center to GitHub by Microsoft Azure Automation product group. All the Script Center fields like Rating, RatingCount and DownloadCount have been carried over to Github as-is for the migrated scripts only. Note : The Script Center fields will not be applicable for the new repositories created in Github & hence those fields will not show up for new Github repositories.

About

This script is intended to be run as a part of Update Management Pre/Post scripts. This script will run an Azure Automation runbook via a hybrid worker, allowing for local execution of a script. It requires a System Managed Identity and a hybrid worker configured on the machine.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published