Get-AzWebApp

Cmdlet Name: Get-AzWebApp

Module: Az.Websites

Aliases:

Applies To: Azure App Service Web Apps

Description

The Get-AzWebApp cmdlet retrieves information about Azure App Service web apps. You can retrieve information about all web apps in a subscription, or filter them by resource group, name, or other properties.

Parameters

-Name [String]

Specifies the name of the web app.

-ResourceGroupName [String]

Specifies the name of the resource group that the web app belongs to.

-WebAppName [String]

Specifies the name of the web app. This parameter is an alias for the -Name parameter.

-IncludeSlots [Switch]

Includes deployment slots in the output. By default, only the production slot is returned.

-DefaultProfile [IAzureContextContainer]

The credentials, account, tenant, and subscription for the cloud service. This is a common parameter for all cmdlets.

Examples

Example 1: Get a specific web app

Get-AzWebApp -ResourceGroupName "MyResourceGroup" -Name "MyWebApp"

This command retrieves the web app named "MyWebApp" from the resource group "MyResourceGroup".

Example 2: Get all web apps in a resource group

Get-AzWebApp -ResourceGroupName "MyResourceGroup"

This command retrieves all web apps within the specified resource group.

Example 3: Get all web apps in the subscription

Get-AzWebApp

This command retrieves all web apps across the entire Azure subscription. Be cautious, as this can return a large amount of data.

Example 4: Get a web app and its deployment slots

Get-AzWebApp -ResourceGroupName "MyResourceGroup" -Name "MyWebApp" -IncludeSlots

This command retrieves the specified web app along with all of its associated deployment slots.

See Also

Azure PowerShell Cmdlets

Azure.Websites Module