Publish-AzWebApp is an Azure PowerShell cmdlet that helps you upload content to an existing Azure Web App. The only thing is the content should be packaged in a ZIP file.
It helps you to deploy the Azure Web App from a ZIP or WAR file with the help of Zip deploy.
Syntax
Publish-AzWebApp
[-ResourceGroupName] <String>
[-Name] <String>
-ArchivePath <String>
Example
Connect-AzAccount
Publish-AzWebApp -ResourceGroupName Demo1234 -Name azurelessonswebapp -ArchivePath "C:\Raj\tsinfoapp.zip.zip"Once you execute the above Azure PowerShell cmdlet, it deploys the content inside the tsinfoapp.zip file to the web app named azurelessonswebapp, which belongs to the resource group Demo1234. After running the above script, we got the expected output, as shown in the screenshot below. Click on the Yes button.


Similarly, you can use New-AzWebApp to create a new Azure Web App.

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.
