Azure Function App PowerShell 7.2 retiring 8 November 2024

Azure Function App PowerShell 7.2 retiring 8 November 2024

Hi All,

Recently i received a Mail from Microsoft that i have to Update the Azure Function App to PowerShell 7.4 because PowerShell 7.2 retiring 8 November 2024.

Details can be found here:

Azure Portal

In the Azure Portal you can see under Configuration of the Azure Function App.

Runtime Version is probably already “~4”

Under “General settings” you can see the used PowerShell Version. Can be changed here

Change with AZ PowerShell

First let’s check it with Powershell. With Get-AzfunctionAppSetting you can get the “FUNCTION_EXTENSION_VERSION” Variable

Connect-AzAccount -Tenant icewolfch.onmicrosoft.com
Get-AzFunctionAppSetting -ResourceGroupName RG_MTASTS -Name ICEWOLF-MTASTS  | fl

I did expect to see the PowerShell Version in the RuntimeVersion Version.

Get-AzFunctionApp -ResourceGroupName RG_MTASTS -Name ICEWOLF-MTASTS | fl *id*, ServerFarmId, runtime*, OSType

Upgrade the PowerShell Version of the Azure Function App

$SubId = "42ecead4-eae9-4456-997c-1580c58b54ba"
$ResourceGroupName = "RG_MTASTS"
$AppName = "ICEWOLF-MTASTS"
Set-AzResource -ResourceId "/subscriptions/$SubId/resourceGroups/$ResourceGroupName/providers/Microsoft.Web/sites/$AppName/config/web" -UsePatchSemantics -Properties @{ "NetFrameworkVersion"  = 'v6.0' } -Force
Set-AzResource -ResourceId "/subscriptions/$SubId/resourceGroups/$ResourceGroupName/providers/Microsoft.Web/sites/$AppName/config/web" -UsePatchSemantics -Properties @{ powerShellVersion = '7.4' } -Force 

When checking the Azure Portal, the PowerShell Version has been updated

Let’s check again with PowerShell

Get-AzFunctionAppSetting -ResourceGroupName RG_MTASTS -Name ICEWOLF-MTASTS  | fl

RuntimeVersion did not change

Get-AzFunctionApp -ResourceGroupName RG_MTASTS -Name ICEWOLF-MTASTS | fl *id*, ServerFarmId, runtime*, OSType

Now i realized that the PowerShell Version can be found in the SiteConfig Variable

Get-AzFunctionApp -ResourceGroupName RG_MTASTS -Name ICEWOLF-MTASTS | select -ExpandProperty siteconfig

Regards
Andres Bohren

Azure Logo

PowerShell Logo