Thursday, September 29, 2016

To check and remove Azure App service

To determine if an Azure website name already exists, use the following Azure PowerShell
command.


Test-AzureName -Website "contoso-web"


To Remove the website, use the Remove-AzureWebsite cmdlet, specifying the location and
name parameters as shown in the following example.



remove-AzureWebsite -Name contosos-web

Creating an Azure website using Azure PowerShell

Creating an Azure website using the Azure PowerShell cmdlets requires that you know the location (or region) you want to create the site in and a unique name for the site. To determine the website locations that are available to your Azure subscription, use the following Azure PowerShell cmdlet.

Get-AzureWebsiteLocation

The result will be a list of locations that are available to your subscription.To determine if an Azure website name already exists, use the following Azure PowerShell command.

Test-AzureName -Website "contoso-web1000"






















The result will be either true or false. If it is true, then the name specified already exists and therefore cannot be used. If it is false, then the Azure website name does not exist and therefore would be a valid unique name you can use.

To create the website, use the New-AzureWebsite cmdlet, specifying the location and name parameters as shown in the following example.

$wsLocation = "West US"
$wsName = "contoso-web1000"
New-AzureWebsite -Location $wsLocation -Name $wsName











Featured Posts

Adding Accesspolicy to KeyVault for Service Principal Using Portal and Powershell

  Scripts path : https://drive.google.com/drive/folders/1sbBpnVFgXhUIXLdf2E9heyWDeU2f9427?usp=sharing  Adding Accesspolicy to KeyVault for S...