BT

InfoQ Homepage News Bringing Hybrid Automation to Serverless Computing, Microsoft Previews PowerShell in Azure Functions

Bringing Hybrid Automation to Serverless Computing, Microsoft Previews PowerShell in Azure Functions

Bookmarks

In a recent blog post, Microsoft announced PowerShell support in Azure Functions 2.x runtime, in preview. This release focuses on bringing custom logic scenarios to administrators and developers who prefer to script in PowerShell. Azure Function event triggers and bindings bring new capabilities to PowerShell scenarios by supporting on-demand execution in addition to schedule support. 

PowerShell is nothing new in the enterprise, but when used with Azure Functions, it unlocks additional use cases. Eamon O’Reilly, a principal program manager at Microsoft, describes some of the opportunities:

Companies all over the world have been using PowerShell to automate their cloud resources in their organization, as well as on-premises, for years. Most of these scenarios are based on events that happen on the infrastructure or application that must be immediately acted upon in order to meet service level agreements and time to recovery. With the release of PowerShell support in Azure Functions, it is now possible to automate these operational tasks and take advantage of the native Azure integration to modernize the delivering and maintenance of services.

PowerShell in Azure Functions has the traditional benefits of PowerShell, but now includes:

  • Native bindings to respond to Azure monitoring alerts and the ability to subscribe to Azure resource events through Azure Event Grid, HTTP webhooks or Timer triggers
  • Script authoring through the Azure Portal or Visual Studio Code
  • Integrated security for HTTP exposed trigger functions
  • On-premises connectivity through Azure Hybrid Connections and Virtual Network (VNet) connections
  • Isolated local environment support

In addition to these capabilities, Azure modules are automatically included in your Azure Functions. When minor versions of these modules are available, these modules will be automatically updated when there are critical and security updates made to these modules. To enable this feature, developers can set the managedDependency enabled property to true.

A common problem that exists in cloud applications is managing credentials, or secrets, for downstream cloud resources. Microsoft has previously introduced Managed Identities, a feature of Azure Active Directory, that provides Azure services to authenticate against any service that supports Azure AD authentication. O’Reilly explains how Azure Functions can take advantage of Managed Identities to simplify PowerShell authentication scenarios:

When enabling a managed identity for the function app, the PowerShell host can automatically authenticate using this identity, giving functions permission to take actions on services that the managed identity has been granted access. The profile.ps1 is processed when a function app is started and enables common commands to be executed. By default, if managed identify is enabled, the function application will authenticate with Connect-AzAccount -Identity.

Image source: https://azure.microsoft.com/en-us/blog/serverless-automation-using-powershell-preview-in-azure-functions/

Microsoft envisions PowerShell support in Azure Functions to enable common automation scenarios in Azure such as performing operational tasks on virtual machines, SQL Server, Web Apps and other resources. In addition to these core scenarios, Azure Logic Apps can also be integrated to allow for SaaS and Line of Business connectivity with their support for more than 250 connectors.

 

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.