Skip to content

Upgrading your Azure Function Apps to run on PowerShell 7.6

Anatoli Beliaev edited this page Jun 29, 2026 · 2 revisions

Note: PowerShell 7.6 is a Long-Term Support (LTS) release built on .NET 10 and supported through November 14, 2028. PowerShell 7.4 remains supported until November 10, 2026, but upgrading to 7.6 gives you the latest language features and a longer support runway. Learn more about PowerShell End-of-support dates.

Follow this guide to upgrade your existing Azure PowerShell Function Apps to PowerShell 7.6

Before you begin

Before you upgrade your app to PowerShell 7.6, please review the breaking changes below and plan to test your app in a non-production environment. Because PowerShell 7.6 is two minor versions ahead of 7.4, your app crosses the breaking changes introduced in both PowerShell 7.5 and PowerShell 7.6.

Breaking changes

No Linux Consumption plan support

PowerShell 7.6 is not available on the Linux Consumption plan. PowerShell 7.4 is the last PowerShell version supported there, and newer versions aren't being added — see Supported languages in Azure Functions. To run PowerShell 7.6 on Linux, host your app in a Flex Consumption, Functions Premium, or App Service plan. To move an existing Linux Consumption app to Flex Consumption, see Migrate Consumption plan apps to the Flex Consumption plan.

Durable Functions: the standalone (external) SDK is now the default

⚠️ This is the most impactful change for apps that use Durable Functions. Apps that do not use Durable Functions are not affected by it.

Starting with PowerShell 7.6, the Functions worker uses the standalone Durable Functions PowerShell SDK (AzureFunctions.PowerShell.Durable.SDK) by default, instead of the built-in SDK that shipped inside the worker in 7.4 and earlier. The standalone SDK uses the same replay engine as the C# isolated SDK, versions independently of the worker, and improves exception handling, null-value handling, and serialization.

What this means when you migrate:

  • If your PowerShell 7.4 app already uses the standalone SDK, no action is required — it continues to work on 7.6.
  • If your app uses Durable Functions through the built-in SDK, you must take one of the two actions below before moving to 7.6. If you do neither, your Durable functions will fail to start on 7.6. This failure is by design: it makes the behavior change visible instead of silently swapping SDKs underneath a running app.

Option 1 — Adopt the standalone SDK (recommended)

Install the AzureFunctions.PowerShell.Durable.SDK module (via managed dependencies in requirements.psd1, or by bundling it in your app content) and import it by adding the following line to your profile.ps1:

Import-Module AzureFunctions.PowerShell.Durable.SDK -ErrorAction Stop

The standalone SDK introduces new and modified cmdlets and a few behavioral changes (for example, exceptions from Wait-DurableTask now propagate to the orchestrator, and $null results are preserved). Review and follow the full, up-to-date instructions in the official guide:

Option 2 — Opt out and keep the built-in SDK (not recommended)

If you cannot adopt the standalone SDK yet, you can opt out and keep using the built-in SDK by creating the following application setting on your function app:

  • Name: ExternalDurablePowerShellSDK
  • Value: false
Set-AzResource -ResourceId "/subscriptions/$SubId/resourceGroups/$ResourceGroupName/providers/Microsoft.Web/sites/$AppName/config/appsettings" -UsePatchSemantics -Properties @{ ExternalDurablePowerShellSDK = 'false' } -Force

⚠️ This is a temporary measure only. The built-in Durable SDK is deprecated and is planned to be removed entirely in a future version of the PowerShell worker. Apps that opt out should still plan to migrate to the standalone SDK.

ConvertTo-Json serializes BigInteger as a number (PowerShell 7.5)

Beginning in PowerShell 7.5, ConvertTo-Json serializes [System.Numerics.BigInteger] values as a JSON number instead of an object (PowerShell/PowerShell#21000). If your function output or any downstream consumer depends on the previous serialization shape for BigInteger values, update your code accordingly.

The ThreadJob module is renamed to Microsoft.PowerShell.ThreadJob (PowerShell 7.6)

PowerShell 7.6 replaces the ThreadJob module with Microsoft.PowerShell.ThreadJob. If your function code references the module by name (for example, an explicit Import-Module ThreadJob), update the reference to Microsoft.PowerShell.ThreadJob.

PowerShell 7.5 and PowerShell 7.6 breaking changes

Please review the following notes on breaking changes in PowerShell 7.5 and 7.6:

Other breaking changes

The PowerShell Functions team is still evaluating the full impact of the PowerShell 7.5 and 7.6 changes on the worker. Please use caution around these scenarios and test thoroughly before upgrading production apps. For the latest status, see Potential breaking changes in PowerShell 7.6 Functions worker (#1129).

How to upgrade

Apps already running on PowerShell 7.4 are on the Azure Functions v4 runtime, so the only change required is the PowerShell version itself.

In PowerShell Functions, the value "~7" for FUNCTIONS_WORKER_RUNTIME_VERSION refers to "7.0.x". We do not automatically upgrade PowerShell Function apps that have "~7" to "7.6". Going forward we will require that apps specify both the major and minor version they want to target. Hence, it is necessary to mention "7.6" if you want to target "7.6.x"

Developing PowerShell 7.6 function apps locally using VS Code

  1. Open your Azure Functions App using VS Code
  2. Navigate to "local.settings.json"
  3. Add the property "FUNCTIONS_WORKER_RUNTIME_VERSION" and set the value to "7.6".

The local.settings.json file should look like:

{ 
 "IsEncrypted": false, 
 "Values": { 
   "AzureWebJobsStorage": "", 
   "FUNCTIONS_WORKER_RUNTIME": "powershell", 
   "FUNCTIONS_WORKER_RUNTIME_VERSION" : "7.6" 
 } 
} 

Upgrading your Function App to run on PowerShell 7.6

Using Azure Portal

Note: Upgrading the language version of Linux Function Apps is currently not supported via the portal experience. For Linux, follow the instructions below for PowerShell/ARM

  1. Sign in to the Azure portal and navigate to your function app.
  2. On the left panel, under Settings, select Configuration.
  3. Open the Stack settings tab.
  4. Set Version to PowerShell 7.6.
  5. Select Apply. PowerShell Version

Using Azure PowerShell

For Windows

To migrate your PowerShell Function App to 7.6, execute the command below:

$SubId =$ResourceGroupName = ... 
$AppName = ... 

Set-AzResource -ResourceId "/subscriptions/$SubId/resourceGroups/$ResourceGroupName/providers/Microsoft.Web/sites/$AppName/config/web" -UsePatchSemantics -Properties @{ powerShellVersion = '7.6' } -Force 

For Linux — Flex Consumption

The PowerShell version is configured through the app's functionAppConfig.runtime property (name and version).

Update the PowerShell version using any of the following:

  • Azure portal — under Settings > Configuration > General settings, set PowerShell Core Version to 7.6 and save.
  • Azure PowerShell — patch functionAppConfig.runtime on the app (note the resource ID targets the site itself, not /config/web):
Set-AzResource -ResourceId "/subscriptions/$SubId/resourceGroups/$ResourceGroupName/providers/Microsoft.Web/sites/$AppName" -UsePatchSemantics -Properties @{ functionAppConfig = @{ runtime = @{ name = 'powershell'; version = '7.6' } } } -Force
  • ARM/Bicep — redeploy your template with functionAppConfig.runtime.version set to 7.6 (see the Flex Consumption ARM example below).

For Linux — Functions Premium and App Service plans

These plans configure the PowerShell version through the linuxFxVersion site setting. To upgrade your app to 7.6, execute the command below:

Set-AzResource -ResourceId "/subscriptions/$SubId/resourceGroups/$ResourceGroupName/providers/Microsoft.Web/sites/$AppName/config/web" -UsePatchSemantics -Properties @{ linuxFxVersion = 'PowerShell|7.6' } -Force

Creating Azure Functions using PowerShell 7.6 in ARM template

For Windows

In your ARM template, please specify these settings:

    "siteConfig": { 
        "appSettings": [ 
            ... 
            { 
                "name": "FUNCTIONS_EXTENSION_VERSION", 
                "value": "~4" 
            }, 
            { 
                "name": "FUNCTION_WORKER_RUNTIME", 
                "value": "powershell" 
            }, 
            ... 
        ], 
        ... 
        "powerShellVersion": "7.6", 
        ... 
    } 

For Linux — Flex Consumption

Configure the PowerShell version under properties.functionAppConfig.runtime:

"properties": {
    ...
    "functionAppConfig": {
        "deployment": {
            ...
        },
        "scaleAndConcurrency": {
            ...
        },
        "runtime": {
            "name": "powershell",
            "version": "7.6"
        }
    }
}

For a complete Flex Consumption ARM/Bicep template, see the Azure Functions Flex Consumption samples and Create and manage function apps in the Flex Consumption plan.

For Linux — Functions Premium and App Service plans

"siteConfig": {
    "appSettings": [
        ...
        {
            "name": "FUNCTIONS_EXTENSION_VERSION",
            "value": "~4"
        },
        {
            "name": "FUNCTION_WORKER_RUNTIME",
            "value": "powershell"
        },
        ...
    ],
    ...
    "linuxFxVersion": "PowerShell|7.6",
    ...
}

Clone this wiki locally