Skip to content

Commit 971556f

Browse files
Merge pull request #285894 from lilyjma/powershell74
Updated docs to reflect Azure Functions GA support for PS 7.4
2 parents af9f907 + ca25ac2 commit 971556f

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

articles/azure-functions/create-first-function-cli-powershell.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Before you begin, you must have the following:
3131

3232
+ The [.NET 6.0 SDK](https://dotnet.microsoft.com/download)
3333

34-
+ [PowerShell 7.2](/powershell/scripting/install/installing-powershell-core-on-windows)
34+
+ [PowerShell 7.4](/powershell/scripting/install/installing-powershell-core-on-windows)
3535

3636
[!INCLUDE [functions-install-core-tools](../../includes/functions-install-core-tools.md)]
3737

articles/azure-functions/functions-reference-powershell.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -389,34 +389,40 @@ The following table shows the PowerShell versions available to each major versio
389389

390390
| Functions version | PowerShell version | .NET version |
391391
|-------------------|--------------------------------------------------|---------------|
392-
| 4.x | PowerShell 7.2 | .NET 6 |
392+
| 4.x | PowerShell 7.4 | .NET 8 |
393+
| 4.x | PowerShell 7.2 (support ending) | .NET 6 |
393394

394395
You can see the current version by printing `$PSVersionTable` from any function.
395396

396397
To learn more about Azure Functions runtime support policy, please refer to this [article](./language-support-policy.md)
397398

399+
> [!NOTE]
400+
> Support for PowerShell 7.2 in Azure Functions ends on November 8, 2024. You might have to resolve some breaking changes when upgrading your PowerShell 7.2 functions to run on PowerShell 7.4. Follow this [migration guide](https://github.com/Azure/azure-functions-powershell-worker/wiki/Upgrading-your-Azure-Function-Apps-to-run-on-PowerShell-7.4) to upgrade to PowerShell 7.4.
401+
398402
### Running local on a specific version
399403

400-
Support for PowerShell 7.0 in Azure Functions has ended on 3 December 2022. To use PowerShell 7.2 when running locally, you need to add the setting `"FUNCTIONS_WORKER_RUNTIME_VERSION" : "7.2"` to the `Values` array in the local.setting.json file in the project root. When running locally on PowerShell 7.2, your local.settings.json file looks like the following example:
404+
When running your PowerShell functions locally, you need to add the setting `"FUNCTIONS_WORKER_RUNTIME_VERSION" : "7.4"` to the `Values` array in the local.setting.json file in the project root. When running locally on PowerShell 7.4, your local.settings.json file looks like the following example:
401405

402406
```json
403407
{
404408
"IsEncrypted": false,
405409
"Values": {
406410
"AzureWebJobsStorage": "",
407411
"FUNCTIONS_WORKER_RUNTIME": "powershell",
408-
"FUNCTIONS_WORKER_RUNTIME_VERSION" : "7.2"
412+
"FUNCTIONS_WORKER_RUNTIME_VERSION" : "7.4"
409413
}
410414
}
411415
```
412416

413417
> [!NOTE]
414-
> 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.2". Going forward, for PowerShell Function Apps, we will require that apps specify both the major and minor version they want to target. Hence, it is necessary to mention "7.2" if you want to target "7.2.x"
418+
> 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.4". Going forward, for PowerShell Function Apps, we will require that apps specify both the major and minor version they want to target. Hence, it is necessary to mention "7.4" if you want to target "7.4.x"
415419
416420
### Changing the PowerShell version
417421

418-
Support for PowerShell 7.0 in Azure Functions has ended on 3 December 2022. To upgrade your Function App to PowerShell 7.2, ensure the value of FUNCTIONS_EXTENSION_VERSION is set to ~4. To learn how to do this, see [View and update the current runtime version](set-runtime-version.md#view-the-current-runtime-version).
422+
Take these considerations into account before you migrate your PowerShell function app to PowerShell 7.4:
423+
+ Because the migration might introduce breaking changes in your app, review this [migration guide](https://github.com/Azure/azure-functions-powershell-worker/wiki/Upgrading-your-Azure-Function-Apps-to-run-on-PowerShell-7.4) before upgrading your app to PowerShell 7.4.
419424

425+
+ Make sure that your function app is running on the latest version of the Functions runtime in Azure, which is version 4.x. For more information, see [View and update the current runtime version](set-runtime-version.md#view-the-current-runtime-version).
420426

421427
Use the following steps to change the PowerShell version used by your function app. You can do this either in the Azure portal or by using PowerShell.
422428

@@ -430,6 +436,9 @@ Use the following steps to change the PowerShell version used by your function a
430436

431437
1. Choose your desired **PowerShell Core version** and select **Save**. When warned about the pending restart choose **Continue**. The function app restarts on the chosen PowerShell version.
432438

439+
> [!NOTE]
440+
> Azure Functions support for PowerShell 7.4 is generally available (GA). You may see PowerShell 7.4 still indicated as preview in the Azure portal, but this will be updated soon to reflect the GA status.
441+
433442
# [PowerShell](#tab/powershell)
434443

435444
Run the following script to change the PowerShell version:
@@ -439,7 +448,7 @@ Set-AzResource -ResourceId "/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RES
439448
440449
```
441450

442-
Replace `<SUBSCRIPTION_ID>`, `<RESOURCE_GROUP>`, and `<FUNCTION_APP>` with the ID of your Azure subscription, the name of your resource group and function app, respectively. Also, replace `<VERSION>` with `7.2`. You can verify the updated value of the `powerShellVersion` setting in `Properties` of the returned hash table.
451+
Replace `<SUBSCRIPTION_ID>`, `<RESOURCE_GROUP>`, and `<FUNCTION_APP>` with the ID of your Azure subscription, the name of your resource group and function app, respectively. Also, replace `<VERSION>` with `7.4`. You can verify the updated value of the `powerShellVersion` setting in `Properties` of the returned hash table.
443452

444453
---
445454

0 commit comments

Comments
 (0)