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.
5,908 questions
Windows for business Windows Server User experience PowerShell
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Manu Philip 20,206 Reputation points MVP Volunteer Moderator
    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


  2. Navid Khan 0 Reputation points
    2024-10-30T03:39:11.95+00:00

    Try with and don't forget to set context of subscription

    $funcApp = Get-AzFunctionApp -ResourceGroupName 'test-rg-01' -Name 'test-func-01'
    $funcPSVersion = $funcApp.SiteConfig.PowerShellVersion
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.