From 29169ecb932572f528cb34a75259237d82f5237f Mon Sep 17 00:00:00 2001 From: Mughundhan_R-MSFT <56299140+MughundhanRaveendran-MSFT@users.noreply.github.com> Date: Thu, 15 Dec 2022 14:48:42 +0530 Subject: [PATCH] (AzureCXP) fixes MicrosoftDocs/azure-docs#102758 https://github.com/MicrosoftDocs/azure-docs/issues/102758 --- EOLHostMigration/CheckEOLAppsPerAzSub.ps1 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/EOLHostMigration/CheckEOLAppsPerAzSub.ps1 b/EOLHostMigration/CheckEOLAppsPerAzSub.ps1 index 2b3d9cf..28ed02e 100644 --- a/EOLHostMigration/CheckEOLAppsPerAzSub.ps1 +++ b/EOLHostMigration/CheckEOLAppsPerAzSub.ps1 @@ -1,10 +1,12 @@ # This script lists outs Azure Function apps that are running on the v3 version of the host so they can be upgraded # Review https://learn.microsoft.com/en-us/azure/azure-functions/migrate-version-3-version-4 for details on how to upgrade to ~4 of the runtime -$Subscription = '' - -Set-AzContext -Subscription $Subscription | Out-Null +$subscriptions = Get-AzSubscription +foreach ($sub in $subscriptions) { + +Set-AzContext -Subscription $sub| Out-Null + $FunctionApps = Get-AzFunctionApp $AppInfo = @{} @@ -18,6 +20,5 @@ foreach ($App in $FunctionApps) } $AppInfo -$AppInfo.Count -$AppInfo | Export-Csv -Path "$PSScriptRoot\YourEOLApps.csv" -NoTypeInformation \ No newline at end of file +}