Running Azure Powershell script on Azure portal

Salil Singh 20 Reputation points
2024-04-02T17:37:50.6533333+00:00

Hi Team,

On Azure portal, i need to run below Azure Powershell script, could you please mention how could I run it -

$FunctionApps = Get-AzFunctionApp

$AppInfo = @{}

foreach ($App in $FunctionApps)

{

if ($App.Runtime -eq 'dotnet')

{

$AppInfo.Add($App.Name, $App.Runtime) }

}

$AppInfo

Thanks,

Salil

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,347 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,395 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Andreas Baumgarten 98,216 Reputation points MVP
    2024-04-02T19:23:38.63+00:00

    Hi @Salil Singh ,

    you could run PowerShell scripts or single commands in the Cloud Shell of the Azure Portal:

    Get started with Azure Cloud Shell

    Update:

    save your script in a file with the extension ps1. For instance Get-AzureFunctionApps.ps1

    Upload the script in your Cloud Shell:

    enter image description here

    Verify the file is uploaded and start the script with ./Get-AzureFunctionApps.ps1

    enter image description here


    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards

    Andreas Baumgarten

    1 person found this answer helpful.