Export Web App List

Handian Sudianto 4,811 Reputation points
2023-03-20T05:55:04.6033333+00:00

Hello,

Can we export all azure web app to the CSV including the url name / default domain?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,628 questions
0 comments No comments
{count} votes

Accepted answer
  1. TP 89,011 Reputation points
    2023-03-20T07:08:06.4966667+00:00

    Hi,

    Sure. Basic example code to get you started below:

    Get-AzWebApp|Select-Object -Property Name,DefaultHostName|Export-Csv -Path .\WebApps.csv -NoTypeInformation
    
    

    NOTE: above will include Function Apps, API Apps, and other apps that are part of app service platform in addition to Web Apps.

    You need to decide which precise properties you want to export to CSV file. Depending on the property, it may be as simple as adding it to the comma-separated list in the above command. "DefaultHostName" above is <hostname>.azurewebsites.net, which might not be what you need. Below are list of properties to choose from:

    https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.management.websites.models.site?view=azure-dotnet#properties

    If you test and are having trouble getting a specific property you need to show up in the file add a comment and I will help with required code change(s).

    If the above is helpful please click Accept Answer.

    Thanks.

    -TP


0 additional answers

Sort by: Most helpful

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.