Azure, Powershell

Missing required metadata properties error when running New-OnPremiseHybridWorker

Hey folks.  Just a quick post around an into an issue today whilst having a play with Azure Automation.  One of the capabilities of Azure Automation is the ability to configure the Hybrid Runbook Worker feature. This allows you to configure Azure Automation with your on premise infrastructure which is pretty cool.

One of the configuration steps is to run the PowerShell cmdlet New-OnPremiseHybridWorker. You run this by executing the following command:

“Install-Script -Name New-OnPremiseHybridWorker”

However, when I attempted this I got an error message below:

image

After hunting around I found the solution on GitHub.  It appears that you have to upgrade the module PowerShellGet for this to work. So if you just execute Install-module PowerShellGet it won’t upgrade as it detects that an existing version is installed. The version I had installed was version 1.0.0.1, it requires 2.2.1

image

We need to execute “Install-Module PowerShellGet –Force” and then “Update-Module –Name PowerShellGet” and then it updates successfully.

We can now run the “Install-Script –Name OnPremiseHybridWorker” command successfully.

image

Hope this helps somebody else who has ran into the same problem as me. More info can be found here – https://github.com/MicrosoftDocs/azure-docs/issues/31841

References

Leave a Reply

Your email address will not be published. Required fields are marked *