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:
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:
I hope this was useful for you and also I hope more PowerShell module authors will include connections in the modules.
Stanislav Zhelyazkov has been working in IT since 2007. Stanislav has started his IT career as a Help Desk Specialist in 2007 while studying Informatics in the University of Ruse. He also worked in HP Enterprise Services (now known as DXC), maintaining large corporate IT infrastructures for clients in Holland, Switzerland and Germany and was involved in a Private Cloud project based on MS Hyper-V and System Center. He was also in the role of Principal Consultant in Lumagate developing and consulting companies on Azure, OMS, management and Private clouds. Currently he is Cloud Infrastructure Engineer at Sentia Denmark. Stanislav is active community member at MSDN forums providing answers on Azure. His blogposts can be found at www.cloudadministrator.net or www.systemcentercentral.com.
View all posts by Stanislav Zhelyazkov