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 +}