Get the PublishProfile of an Azure WebApp using Powershell

How can we get the PublishProfile for an Azure WebApp using Powershell? I’m not looking for Get-AzurePublishSettingsFile cmdlet. That gives me the PublishSettings for the whole subscription. I want the PublishSettings only for that particular Azure WebApp.

We can get this file when we click the following link on Azure Portal.

The content of the file is something like shown below.

Can someone please help me get this?

I found the solution for this.

We can use the following cmdlet to get the PublishSettings.

Hope this helps others who encounter this issue.