
This Azure tutorial will discuss how to create an Azure web app using the PowerShell command New-AzWebApp and its syntax with examples.
Table of Contents
New-AzWebApp
New-AzWebApp is an excellent Azure PowerShell cmdlet that can help you quickly create an Azure Web App for a specified resource group, App Service Plan.
You need to specify key parameters along with this Azure PowerShell cmdlet, like name, resource group name, location, App Service Plan, etc.
Syntax
New-AzWebApp
[[-ResourceGroupName] <String>]
[-Name] <String>
[[-Location] <String>]
[[-AppServicePlan] <String>]Example
Let’s consider the below example. Here we will create an Azure Web App named “TSINFOSite” with the resource group name “Demo123”, Location is “East US”, and the App Service Plan as “TSINFOASP12”.
Execute the below Azure PowerShell Cmdlet.
PS C:\WINDOWS\system32> New-AzWebApp -ResourceGroupName Demo123 -Name "TSINFOSite" -Location "East US" -AppServicePlan "TSINFOASP12
"Once you execute the above Azure PowerShell cmdlet, you will get the output like the one below
GitRemoteName :
GitRemoteUri :
GitRemoteUsername :
GitRemotePassword :
AzureStorageAccounts :
AzureStoragePath :
State : Running
HostNames : {tsinfosite.azurewebsites.net}
RepositorySiteName : TSINFOSite
UsageState : Normal
Enabled : True
EnabledHostNames : {tsinfosite.azurewebsites.net,
tsinfosite.scm.azurewebsites.net}
AvailabilityState : Normal
HostNameSslStates : {tsinfosite.azurewebsites.net,
tsinfosite.scm.azurewebsites.net}
ServerFarmId : /subscriptions/1cdf4300-dee5-4518-9c9c-feaa72a5cbd1/reso
urceGroups/Demo123/providers/Microsoft.Web/serverfarms/T
SINFOASP12
Reserved : False
IsXenon : False
HyperV :
LastModifiedTimeUtc : 6/25/2021 3:07:32 AM
SiteConfig : Microsoft.Azure.Management.WebSites.Models.SiteConfig
TrafficManagerHostNames :
ScmSiteAlsoStopped : False
TargetSwapSlot :
HostingEnvironmentProfile :
ClientAffinityEnabled : True
ClientCertEnabled : False
ClientCertMode :
ClientCertExclusionPaths :
HostNamesDisabled : False
CustomDomainVerificationId :
OutboundIpAddresses : 52.170.7.25,52.168.75.147,52.179.5.98,52.179.1.81,52.179
.4.232
PossibleOutboundIpAddresses : 52.170.7.25,52.168.75.147,52.179.5.98,52.179.1.81,52.179
.4.232,52.179.2.103,52.170.87.19
ContainerSize : 0
DailyMemoryTimeQuota : 0
SuspendedTill :
MaxNumberOfWorkers :
CloningInfo :
ResourceGroup : Demo123
IsDefaultContainer :
DefaultHostName : tsinfosite.azurewebsites.net
SlotSwapStatus :
HttpsOnly : False
RedundancyMode :
InProgressOperationId :
Identity :
Id : /subscriptions/1cdf4300-dee5-4518-9c9c-feaa72a5cbd1/reso
urceGroups/Demo123/providers/Microsoft.Web/sites/TSINFOS
ite
Name : TSINFOSite
Kind : app
Location : East US
Type : Microsoft.Web/sites
Tags :
You can see the same output in the below screenshot.

Create Azure web app – Video Tutorial
You may like following the below Azure tutorials:
Conclusion
This Azure tutorial will discuss how to create an Azure web app using the PowerShell command New-AzWebApp.
I hope you have enjoyed this article !!!
I am Bijay, a Microsoft MVP (10 times) having more than 17 years of experience in the software industry. During my IT career, I got a chance to share my expertise in SharePoint and Microsoft Azure, like Azure VM, Azure Active Directory, Azure PowerShell, etc. I hope you will learn from these Azure tutorials. Read more
