You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can see the current version by printing `$PSVersionTable` from any function.
395
395
396
396
To learn more about Azure Functions runtime support policy, please refer to this [article](./language-support-policy.md)
397
397
398
+
> [!NOTE]
399
+
> Support for PowerShell 7.2 in Azure Functions will end on 8 November 2024. 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, which contains breaking changes.
400
+
398
401
### Running local on a specific version
399
402
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:
403
+
To use PowerShell 7.4 when running 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:
401
404
402
405
```json
403
406
{
404
407
"IsEncrypted": false,
405
408
"Values": {
406
409
"AzureWebJobsStorage": "",
407
410
"FUNCTIONS_WORKER_RUNTIME": "powershell",
408
-
"FUNCTIONS_WORKER_RUNTIME_VERSION" : "7.2"
411
+
"FUNCTIONS_WORKER_RUNTIME_VERSION" : "7.4"
409
412
}
410
413
}
411
414
```
412
415
413
416
> [!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"
417
+
> 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"
415
418
416
419
### Changing the PowerShell version
417
420
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).
421
+
Before upgrading your Function App to PowerShell 7.4, 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 proceeding as there are breaking changes.
419
422
423
+
To upgrade your Function App to PowerShell 7.4, 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).
420
424
421
425
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.
422
426
@@ -430,6 +434,9 @@ Use the following steps to change the PowerShell version used by your function a
430
434
431
435
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.
432
436
437
+
> [!NOTE]
438
+
> 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.
439
+
433
440
# [PowerShell](#tab/powershell)
434
441
435
442
Run the following script to change the PowerShell version:
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.
449
+
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.
0 commit comments