In this latest post in Donnie and I’s Migrating from Orchestrator series, I’ll show you how to setup Hybrid Connection for PowerShell Azure Functions. This will allow you to perform automation tasks on-prem with Function Apps using PowerShell Core.
- App Service Plan
- Azure Function in my case I’m using PowerShell Core
You’ll need a non shared or dev/test App Service Plan. The cheapest one I’m aware of that allows Hybrid Connections is the B1 which is the Basic plan. https://azure.microsoft.com/en-us/pricing/details/app-service/windows/
Otherwise Hybrid Connections won’t show up, if using a Consumption Function. Or if you’re on a shared or dev/test App Service Plan you’ll get this message.
Setup Hybrid Connection
Once setup with the proper App Service Plan, you’ll have the Hybrid connections option under your Azure Function -> Platform Features -> Networking.
Open Hybrid connections and select Add.
Give your connection a name, a end point name that can be resolved on the server Hybrid connections will be isntalled on. Then give it a port to use, and Servicebus topic.
Next, you’ll need to download the install agent, copy it to your server and install it. Once installed open the application and click Add a new Hybrid Connection.
You’ll need to be able to sign into Azure. Sorry Server Core. In my case I had to add all the Azure login URLs to trusted sites.
You’ll be prompted to select your Azure Subscription and select from your published Hybrid Connections.
In my case because I selected port 777. I did have to make a special firewall rule for TCP 777 before the connection was successful.
Having Hybrid Connection for Azure Functions opens a new world of on-prem automation options with PowerShell Core.
Hi, I’m Billy York. I’m a Cloud and Datacenter Management MVP, specializing in monitoring and automation. Here you’ll find posts about AzureMonitor, LogAnalytics, System Center Operations Manager, Powershell, Hyper-V, Azure Automation, Azure Governance and other Microsoft related technologies.