Get-AzAppServicePlan

In this Azure PowerShell article, we will discuss the syntax and usage of the Get-AzAppServicePlan PowerShell command with certain examples.

Get-AzAppServicePlan

This PowerShell command can help you retrieve an Azure App Service plan in the resource group that you have specified.

Syntax

Below is the syntax of the Get-AzAppServicePlan PowerShell command.

Get-AzAppServicePlan
Get-AzAppServicePlan
 [[-ResourceGroupName] <String>]
Get-AzAppServicePlan
 -Location] <String>

Let’s discuss a few examples of how to use the Get-AzAppServicePlan PowerShell command.

Example-1

You can execute the below Azure PowerShell command to retrieve an Azure App Service plan in the resource group.

Get-AzAppServicePlan

After executing the above command, I got the below output.

PS C:\windows\system32> Get-AzAppServicePlan


AdminSiteName             : 
WorkerTierName            : 
Status                    : Ready
Subscription              : 1cdf4300-dee5-4518-9c9c-feaa72a5cbd1
HostingEnvironmentProfile : 
MaximumNumberOfWorkers    : 0
GeoRegion                 : East US
PerSiteScaling            : False
ElasticScaleEnabled       : 
MaximumElasticWorkerCount : 
NumberOfSites             : 1
IsSpot                    : False
SpotExpirationTime        : 
FreeOfferExpirationTime   : 
ResourceGroup             : DEMORG2
Reserved                  : False
IsXenon                   : False
HyperV                    : 
TargetWorkerCount         : 0
TargetWorkerSizeId        : 0
ProvisioningState         : Succeeded
KubeEnvironmentProfile    : 
Sku                       : Microsoft.Azure.Management.WebSites.Models.SkuDescription
ExtendedLocation          : 
Id                        : /subscriptions/1cdf4300-dee5-4518-9c9c-feaa72a5cbd1/resourceGroups/DEMORG2/providers/Microsoft.Web/serverfarms/ASP-DEMORG2-
                            861c
Name                      : ASP-DEMORG2-861c
Kind                      : functionapp
Location                  : East US
Type                      : Microsoft.Web/serverfarms
Tags                      : 

AdminSiteName             : 
WorkerTierName            : 
Status                    : Ready
Subscription              : 1cdf4300-dee5-4518-9c9c-feaa72a5cbd1
HostingEnvironmentProfile : 
MaximumNumberOfWorkers    : 1
GeoRegion                 : East US
PerSiteScaling            : False
ElasticScaleEnabled       : 
MaximumElasticWorkerCount : 
NumberOfSites             : 1
IsSpot                    : False
SpotExpirationTime        : 
FreeOfferExpirationTime   : 
ResourceGroup             : MyNewResGrp
Reserved                  : False
IsXenon                   : False
HyperV                    : 
TargetWorkerCount         : 0
TargetWorkerSizeId        : 0
ProvisioningState         : Succeeded
KubeEnvironmentProfile    : 
Sku                       : Microsoft.Azure.Management.WebSites.Models.SkuDescription
ExtendedLocation          : 
Id                        : /subscriptions/1cdf4300-dee5-4518-9c9c-feaa72a5cbd1/resourceGroups/MyNewResGrp/providers/Microsoft.Web/serverfarms/Default1
                            nb
Name                      : Default1nb
Kind                      : app
Location                  : East US
Type                      : Microsoft.Web/serverfarms
Tags                      : 

You can see the same output the below screen shot.

Get-AzAppServicePlan

Example-2

You can execute the below PowerShell command can help you to retrieve an App Service plan from the below-specified resource group.

Get-AzAppServicePlan -ResourceGroupName "MyNewResGrp"

After executing the above command I got the details of the App Service plan of the specified resource group as expected.

Get-AzAppServicePlan PowerShell

Conclusion

In this Azure PowerShell article, we discussed the syntax and usage of the Get-AzAppServicePlan PowerShell command with certain examples of how to use this command. Thanks for reading this article !!!