Publish your Module to PowerShell Gallery with Azure Automation Connection


Recently PowerShell Gallery received a feature that you can deploy Modules from PowerShell Gallery to Azure Automation (part of OMS). You can upload PowerShell Modules to Azure Automation with little or not change to the module. If you want to make your PowerShell module more appealing and easy to use in Azure Automation you can create so called Connection. You can read more here. Recently I was able to confirm that if you publish your PowerShell Module with Connection to the PowerShell gallery that Connection will be imported as well when you import your module to Azure Automation. My fellow MVP Tao Yang helped me in confirming this. Basically when you import your module to the PowerShell Gallery make sure that the json file needed for the connection is included in the files for upload:

image

It is interesting that I think I’ve included that json file in the OMSSearch Module since its first release in the PowerShell Gallery and before that feature Deploy to Azure Automation was available.

When you import the OMSSearch module from the PowerShell gallery to your Azure Automation account you will be able to create OMSSearch Connection:

image

I hope this was useful for you and also I hope more PowerShell module authors will include connections in the modules.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s