Powershell script to get the runtime stack version for all my web apps and functions in a subscription

HectorMH Jimenez 41 Reputation points
2022-02-18T23:31:59.777+00:00

exist a Powershell script to get the runtime stack version for all my web apps and functions in a subscription?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,261 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,363 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,876 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Manu Philip 16,971 Reputation points MVP
    2022-02-19T06:41:00.09+00:00

    Here is a sample PowerShell script to show all web app stacks in all accounts under the subscription

    $subscriptions = az account list | ConvertFrom-Json
    foreach ($s in $subscriptions) {
    az account set -s $s.name  
    $webapps = Get-AzWebapp 
    foreach ($w in $webapps) {
    $myapp=Get-AzWebApp -Name $w.name
    $myapp.SiteConfig | fl *Version*
    }
    }
    

    If the Answer is helpful, please click "Accept Answer" and upvote it