Public Preview of PowerShell in Azure Functions 2.x

Joey Aiello

Joey

Over the last six months, we’ve been hard at work integrating PowerShell Core with Azure Functions 2.x. Today, I’m happy to announce that we’re releasing public preview of PowerShell support for Azure Functions 2.x for Windows (ConsumptionPremium, and App Service pricing plans).

I already know I want this, give me the good stuff!

Learn how to create your first PowerShell function in Azure Functions, or dive right into the Azure Functions PowerShell developer guide.

What’s Azure Functions?

For those that haven’t experienced the joy of using Azure Functions yet, it’s an event-based serverless platform that enables you to write code in a variety of languages without having to worry about managing infrastructure like VMs or containers. You simply create a function, give it an event trigger, write some PowerShell code, and point your return data at an output binding. That’s it!

Azure Functions supports a multitude of triggers and bindings. Commonly, folks use the HTTP (webhook) triggers to easily create REST API endpoints, but there’s a huge set that supports integration with Microsoft services like Azure and Office 365, as well as 3rd party services like GitHub, SendGrid, and Twilio.

So how does PowerShell fit in?

Today, Azure Functions supports a number of development languages like C#, JavaScript/Node, Java, and Python. While these languages are great for developing serverless applications, PowerShell is geared towards cloud and in-guest management, and as a scripting language can be much simpler to use for certain tasks, including integration with Azure and Office 365.

We built the new PowerShell worker in Azure Functions to take advantage of PowerShell’s ability to natively manage objects. In fact, we’ve already built a bot built on top of Azure Functions that helps out in PRs and issues for the PowerShell GitHub repository. Look out for a blog post in the future that talks more about what it does and how we built it.

What’s included today?

  • PowerShell Core 6.2 worker in Azure Functions 2.x
    • Windows Consumption, Dedicated and Premium pricing models
  • Creation of PowerShell function apps and functions
  • Support and templates for all 2.x triggers and input/output bindings
    with templates
  • Support for the Az modules as a managed dependency which will be kept up to date for you
  • Ability to execute a profile.ps1 on the first cold start of any Functions worker
  • Support for Visual Studio Code, including integration between the Azure Functions and PowerShell extensions
  • Ability to run the PowerShell Core worker within the func CLI on Windows, macOS, and Linux
  • Local debugging of function apps in Visual Studio Code and PowerShell Core

What’s not included today?

  • PowerShell support for Linux in Azure Functions
  • Support for Durable Functions
  • “Live objects” for trigger objects
    • Today, all trigger objects except HTTP are more generic data types
  • Generic PowerShell Gallery support for managed dependencies
  • PowerShell cmdlets for managing Azure Functions (e.g. Az.Functions)

Awesome, how do I get started?

Start with our Azure Functions PowerShell quickstart to learn how to use Visual Studio Code and the Azure Functions Core Tools to create, test, debug, and deploy your first PowerShell function app. Watch Azure Friday video to learn more about using PowerShell in Functions.

I’ve got a problem / Where do I give feedback?

We encourage you to give us feedback via our GitHub repository. Feel free to file and participate in issues for:

  • missing functionality (and why you value that functionality)
  • problems with the programming model (and how it affects your scenarios)
  • bugs in the worker
  • anything else you believe needs improving or fixing

When will this be reaching General Availability (GA)?

We don’t currently have an ETA for when PowerShell in Azure Functions will reach GA, but your feedback will help us drive our prioritization, so make sure to voice your opinions! Even if it’s simply to tell us “works great for me!”, that will help us reach our next milestones more quickly.

That’s it!

Thanks for being an early adopter! We’re really looking forward to seeing what kinds of automation you all build with serverless PowerShell!

Thanks,
Joey Aiello
PM, PowerShell Core

Joey Aiello
Joey Aiello

Follow Joey   

1 comment

Leave a comment