{"id":17611,"date":"2019-04-29T09:33:08","date_gmt":"2019-04-29T17:33:08","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/powershell\/?p=17611"},"modified":"2019-04-30T06:52:53","modified_gmt":"2019-04-30T14:52:53","slug":"public-preview-of-powershell-in-azure-functions-2-x","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/public-preview-of-powershell-in-azure-functions-2-x\/","title":{"rendered":"Public Preview of PowerShell in Azure Functions 2.x"},"content":{"rendered":"<div class=\"markdown-body\">\n<p>Over the last six months, we&#8217;ve been hard at work integrating PowerShell Core with\u00a0<a href=\"https:\/\/azure.microsoft.com\/blog\/introducing-azure-functions-2-0\/\" rel=\"nofollow\">Azure Functions 2.x<\/a>. Today, I&#8217;m happy to announce that\u00a0<a href=\"https:\/\/azure.microsoft.com\/blog\/serverless-automation-using-powershell-preview-in-azure-functions\/\" rel=\"nofollow\">we&#8217;re releasing public preview of PowerShell support for Azure Functions 2.x\u00a0<\/a>for Windows <a href=\"https:\/\/docs.microsoft.com\/azure\/azure-functions\/functions-scale#consumption-plan\" rel=\"nofollow\">(Consumption<\/a>,\u00a0<a href=\"https:\/\/docs.microsoft.com\/azure\/azure-functions\/functions-scale#premium-plan-public-preview\" rel=\"nofollow\">Premium<\/a>, and <a href=\"https:\/\/docs.microsoft.com\/azure\/azure-functions\/functions-scale#app-service-plan\" rel=\"nofollow\">App Service<\/a> pricing plans).<\/p>\n<h2><a id=\"user-content-i-already-know-i-want-this-give-me-the-good-stuff\" class=\"anchor\" href=\"#i-already-know-i-want-this-give-me-the-good-stuff\" aria-hidden=\"true\"><\/a>I already know I want this, give me the good stuff!<\/h2>\n<p>Learn how to create\u00a0<a href=\"https:\/\/docs.microsoft.com\/azure\/azure-functions\/functions-create-first-function-powershell\" rel=\"nofollow\">your first PowerShell function in Azure Functions<\/a>, or dive right into the\u00a0<a href=\"https:\/\/docs.microsoft.com\/azure\/azure-functions\/functions-reference-powershell\" rel=\"nofollow\">Azure Functions PowerShell developer guide<\/a>.<\/p>\n<h2><a id=\"user-content-whats-azure-functions\" class=\"anchor\" href=\"#whats-azure-functions\" aria-hidden=\"true\"><\/a>What&#8217;s Azure Functions?<\/h2>\n<p>For those that haven&#8217;t experienced the joy of using <a href=\"https:\/\/docs.microsoft.com\/azure\/azure-functions\/\" rel=\"nofollow\">Azure Functions<\/a> yet, it&#8217;s an event-based <em>serverless<\/em> 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&#8217;s it!<\/p>\n<p>Azure Functions supports a multitude of <a href=\"https:\/\/docs.microsoft.com\/azure\/azure-functions\/functions-triggers-bindings#supported-bindings\" rel=\"nofollow\">triggers and bindings<\/a>. Commonly, folks use the HTTP (webhook) triggers to easily create REST API endpoints, but there&#8217;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.<\/p>\n<h2><a id=\"user-content-so-how-does-powershell-fit-in\" class=\"anchor\" href=\"#so-how-does-powershell-fit-in\" aria-hidden=\"true\"><\/a>So how does PowerShell fit in?<\/h2>\n<p>Today, Azure Functions <a href=\"https:\/\/docs.microsoft.com\/azure\/azure-functions\/supported-languages\" rel=\"nofollow\">supports a number of development languages<\/a> 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.<\/p>\n<p>We built the new PowerShell worker in Azure Functions to take advantage of PowerShell&#8217;s ability to natively manage objects. In fact, we&#8217;ve already built a bot built on top of Azure Functions that helps out in PRs and issues for the <a href=\"https:\/\/github.com\/powershell\/powershell\">PowerShell GitHub repository<\/a>. Look out for a blog post in the future that talks more about what it does and how we built it.<\/p>\n<h2><a id=\"user-content-whats-included-today\" class=\"anchor\" href=\"#whats-included-today\" aria-hidden=\"true\"><\/a>What&#8217;s included today?<\/h2>\n<ul>\n<li>PowerShell Core 6.2 worker in Azure Functions 2.x\n<ul>\n<li>Windows Consumption, Dedicated and Premium pricing models<\/li>\n<\/ul>\n<\/li>\n<li>Creation of PowerShell function apps and functions<\/li>\n<li>Support and templates for all <a href=\"https:\/\/docs.microsoft.com\/azure\/azure-functions\/functions-triggers-bindings#supported-bindings\" rel=\"nofollow\">2.x triggers and input\/output bindings<\/a>\nwith templates<\/li>\n<li>Support for the <code>Az<\/code> modules as a <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/azure-functions\/functions-reference-powershell#dependency-management\" rel=\"nofollow\">managed dependency<\/a> which will be kept up to date for you<\/li>\n<li>Ability to execute a <code>profile.ps1<\/code> on the first cold start of any Functions worker<\/li>\n<li>Support for Visual Studio Code, including integration between the Azure Functions and PowerShell extensions<\/li>\n<li>Ability to run the PowerShell Core worker within the <code>func<\/code> CLI on Windows, macOS, and Linux<\/li>\n<li>Local debugging of function apps in Visual Studio Code and PowerShell Core\n<ul>\n<li>Requires some setup, see <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/azure-functions\/functions-debug-powershell-local\" rel=\"nofollow\">documentation<\/a> for more info<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2><a id=\"user-content-whats-not-included-today\" class=\"anchor\" href=\"#whats-not-included-today\" aria-hidden=\"true\"><\/a>What&#8217;s not included today?<\/h2>\n<ul>\n<li>PowerShell support for Linux in Azure Functions<\/li>\n<li>Support for <a href=\"https:\/\/docs.microsoft.com\/azure\/azure-functions\/durable-functions-overview\" rel=\"nofollow\">Durable Functions<\/a><\/li>\n<li>&#8220;Live objects&#8221; for trigger objects\n<ul>\n<li>Today, all trigger objects except HTTP are more generic data types<\/li>\n<\/ul>\n<\/li>\n<li>Generic PowerShell Gallery support for managed dependencies<\/li>\n<li>PowerShell cmdlets for managing Azure Functions (e.g. <code>Az.Functions<\/code>)<\/li>\n<\/ul>\n<h2><a id=\"user-content-awesome-how-do-i-get-started\" class=\"anchor\" href=\"#awesome-how-do-i-get-started\" aria-hidden=\"true\"><\/a>Awesome, how do I get started?<\/h2>\n<p>Start with our <a href=\"https:\/\/docs.microsoft.com\/azure\/azure-functions\/functions-create-first-function-powershell\" rel=\"nofollow\">Azure Functions PowerShell quickstart<\/a> 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 <a href=\"https:\/\/channel9.msdn.com\/Shows\/Azure-Friday\/Serverless-automation-using-PowerShell-in-Azure-Functions\" rel=\"nofollow\">Azure Friday<\/a> video to learn more about using PowerShell in Functions.<\/p>\n<h2><a id=\"user-content-ive-got-a-problem--where-do-i-give-feedback\" class=\"anchor\" href=\"#ive-got-a-problem--where-do-i-give-feedback\" aria-hidden=\"true\"><\/a>I&#8217;ve got a problem \/ Where do I give feedback?<\/h2>\n<p>We encourage you to give us feedback via\u00a0<a href=\"https:\/\/github.com\/Azure\/azure-functions-powershell-worker\">our GitHub repository<\/a>. Feel free to file and participate in issues for:<\/p>\n<ul>\n<li>missing functionality (and <em>why<\/em> you value that functionality)<\/li>\n<li>problems with the programming model (and <em>how<\/em> it affects your scenarios)<\/li>\n<li>bugs in the worker<\/li>\n<li>anything else you believe needs improving or fixing<\/li>\n<\/ul>\n<h2><a id=\"user-content-when-will-this-be-reaching-general-availability-ga\" class=\"anchor\" href=\"#when-will-this-be-reaching-general-availability-ga\" aria-hidden=\"true\"><\/a>When will this be reaching General Availability (GA)?<\/h2>\n<p>We don&#8217;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&#8217;s simply to tell us &#8220;works great for me!&#8221;, that will help us reach our next milestones more quickly.<\/p>\n<h2><a id=\"user-content-thats-it\" class=\"anchor\" href=\"#thats-it\" aria-hidden=\"true\"><\/a>That&#8217;s it!<\/h2>\n<p>Thanks for being an early adopter! We&#8217;re really looking forward to seeing what kinds of automation you all build with serverless PowerShell!<\/p>\n<p>Thanks,\nJoey Aiello\nPM, PowerShell Core<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Over the last six months, we&#8217;ve been hard at work integrating PowerShell Core with\u00a0Azure Functions 2.x. Today, I&#8217;m happy to announce that\u00a0we&#8217;re releasing public preview of PowerShell support for Azure Functions 2.x\u00a0for Windows (Consumption,\u00a0Premium, and App Service pricing plans). I already know I want this, give me the good stuff! Learn how to create\u00a0your first [&hellip;]<\/p>\n","protected":false},"author":657,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-17611","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"blog_post_summary":"<p>Over the last six months, we&#8217;ve been hard at work integrating PowerShell Core with\u00a0Azure Functions 2.x. Today, I&#8217;m happy to announce that\u00a0we&#8217;re releasing public preview of PowerShell support for Azure Functions 2.x\u00a0for Windows (Consumption,\u00a0Premium, and App Service pricing plans). I already know I want this, give me the good stuff! Learn how to create\u00a0your first [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/17611","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/657"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=17611"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/17611\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=17611"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=17611"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=17611"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}