- New-AzWebApp: 'resourceGroupName' does not match expected pattern'^[-\w\._\(\)]+[^\.]$

Santhosh kumar, Lavudya 1 Reputation point
2020-09-15T15:25:13.06+00:00

i am getting error while setting resource group name in azure powershell error is - New-AzWebApp: 'resourceGroupName' does not match expected pattern'^[-\w._()]+[^.]$

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,914 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 18,451 Reputation points
    2020-09-16T18:57:11.08+00:00

    Hi @Santhosh kumar, Lavudya ,

    Based on the error message it appears that there is something wrong how you're setting your 'resource group name'. Can you please share the powershell command you are using to set the resource group name? Also, Are you trying to create a new resource group or modify and existing one?

    The New-AzWebApp cmdlet creates an Azure Web App in a given a resource group that uses the specified App Service plan and data center.

    Example: New-AzWebApp -ResourceGroupName Default-Web-WestUS -Name "ContosoSite" -Location "West US" -AppServicePlan "ContosoServicePlan"

    This command creates an Azure Web App named ContosoSite in the existing resource group named Default-Web-WestUS in data center West US. The command uses an existing App Service plan named ContosoServicePlan.

    If you want to set a resource group use Set-AzResourceGroup. The Set-AzResourceGroup cmdlet modifies the properties of a resource group. You can use this cmdlet to add, change, or delete the Azure tags applied to a resource group. Specify the Name parameter to identify the resource group and the Tag parameter to modify the tags. You cannot use this cmdlet to change the name of a resource group.

    Hope that helps.

    Grace

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.