Skip to content

Commit 9805b87

Browse files
author
Melony Qin
committed
add PowerShell script
1 parent 7cc939a commit 9805b87

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

articles/azure-functions/migrate-version-3-version-4.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ On version 3.x of the Functions runtime, your C# function app targets .NET Core
4444
>
4545
> If you're looking for moving to a Long Term Support (LTS) .NET release, we recommend you upgrade to .NET 6 .
4646
>
47-
> Migrating to .NET Isolated worker model to get benefits of .NET isolated worker process, For more information about .NET isolated worker process advantaqges see [](). For more information about .NET version support, see [Supported versions](./dotnet-isolated-process-guide.md#supported-versions).
47+
> Migrating to .NET Isolated worker model to get all benefits provided by Azure Functions .NET isolated worker process. For more information about .NET isolated worker process advantages see [.NET isolated worker process enhancement](./dotnet-isolated-in-process-differences.md). For more information about .NET version support, see [Supported versions](./dotnet-isolated-process-guide.md#supported-versions).
4848
4949
Upgrading from .NET Core 3.1 to .NET 6 running in-process requires minimal updates to your project and virtually no updates to code. Switching to the isolated worker process model requires you to make changes to your code, but provides the flexibility of being able to easily run on any future version of .NET. For a feature and functionality comparison between the two process models, see [Differences between in-process and isolate worker process .NET Azure Functions](./dotnet-isolated-in-process-differences.md).
5050
::: zone-end
@@ -55,6 +55,7 @@ Before you upgrade your app to version 4.x of the Functions runtime, you should
5555

5656
* Review the list of [breaking changes between 3.x and 4.x](#breaking-changes-between-3x-and-4x).
5757
* [Run the pre-upgrade validator](#run-the-pre-upgrade-validator).
58+
* Identify the list of v2&v3 Function Apps in your current Azure Subscription by using the [Azure PowerShell](#identify-function-apps-using-azure-powershell).
5859
* When possible, [upgrade your local project environment to version 4.x](#upgrade-your-local-project). Fully test your app locally using version 4.x of the [Azure Functions Core Tools](functions-run-local.md).
5960
* Upgrade your function app in Azure to the new version. If you need to minimize downtime, consider using a [staging slot](functions-deployment-slots.md) to test and verify your migrated app in Azure on the new runtime version. You can then deploy your app with the updated version settings to the production slot. For more information, see [Migrate using slots](#upgrade-using-slots).
6061
* Republished your migrated project to the upgraded function app. When you use Visual Studio to publish a version 4.x project to an existing function app at a lower version, you're prompted to let Visual Studio upgrade the function app to version 4.x during deployment. This upgrade uses the same process defined in [Migrate without slots](#upgrade-without-slots).
@@ -71,6 +72,33 @@ Azure Functions provides a pre-upgrade validator to help you identify potential
7172

7273
1. After validation completes, review the recommendations and address any issues in your app. If you need to make changes to your app, make sure to validate the changes against version 4.x of the Functions runtime, either [locally using Azure Functions Core Tools v4](#upgrade-your-local-project) or by [using a staging slot](#upgrade-using-slots).
7374

75+
76+
## Identify Function Apps using Azure Powershell
77+
78+
To identify the list of v2&v3 Function Apps in your current Azure Subscription by using the Azure PowerShell script below:
79+
80+
```powershell
81+
$Subscription = '<YOUR SUBSCRIPTION ID>'
82+
83+
Set-AzContext -Subscription $Subscription | Out-Null
84+
85+
$FunctionApps = Get-AzFunctionApp
86+
87+
$AppInfo = @{}
88+
foreach ($App in $FunctionApps)
89+
{
90+
$AppSettings = Get-AzFunctionAppSetting -ResourceGroupName $App.ResourceGroupName -Name $App.Name
91+
if ($AppSettings['FUNCTIONS_EXTENSION_VERSION'] -eq '~3' -or $AppSettings['FUNCTIONS_EXTENSION_VERSION'] -like '3.*')
92+
{
93+
$AppInfo.Add($App.Name,$AppSettings['FUNCTIONS_EXTENSION_VERSION'])
94+
}
95+
}
96+
97+
$AppInfo
98+
99+
```
100+
101+
74102
## Upgrade your local project
75103

76104
Upgrading instructions are language dependent. If you don't see your language, choose it from the selector at the [top of the article](#top).

0 commit comments

Comments
 (0)