Running Azure Powershell script on Azure portal

Salil Singh 60 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.
Windows for business | Windows Server | User experience | PowerShell
{count} votes

1 answer

Sort by: Most helpful
  1. Andreas Baumgarten 129.4K Reputation points MVP Volunteer Moderator
    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.

Your answer

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