In this Azure PowerShell article, we will discuss the syntax and usage of the Get-AzAppServicePlan PowerShell command with certain examples.
Table of Contents
Get-AzAppServicePlan
This PowerShell command can help you retrieve an Azure App Service plan in the resource group that you have specified.
Syntax of Get-AzAppServicePlan
Below is the syntax of the Get-AzAppServicePlan PowerShell command.
Get-AzAppServicePlanGet-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-AzAppServicePlanAfter 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.

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.

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 !!!

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
