title: Failing to deploy the Azure resource manager template
body: <p>I'm trying to create a azure resource manager template to create an app-service plan and an app-service. </p>
  
  <p>But. i'm getting the following error, when i'm trying to deploy the template,</p>
  
  <pre><code>17:40:27 - The following parameter values will be used for this operation:
     17:40:27 -     setup-sites-non-prod-service-planName: setup-sites-non-prod-service-plan
     17:40:27 -     setup-sites-non-prod-service-planSkuName: F1
     17:40:27 - Build started.
     17:40:27 - Project "ARM_OnlineSetup.deployproj" (StageArtifacts target(s)):
     17:40:27 - Project "ARM_OnlineSetup.deployproj" (ContentFilesProjectOutputGroup target(s)):
      17:40:27 - Done building project "ARM_OnlineSetup.deployproj".
      17:40:27 - Done building project "ARM_OnlineSetup.deployproj".
      17:40:27 - Build succeeded.
      17:40:27 - Launching PowerShell script with the following command:
      17:40:27 - 'C:\Users\manjunathj\Documents\Study\ARM_OnlineSetup\bin\Debug\staging\ARM_OnlineSetup\Deploy-AzureResourceGroup.ps1' -StorageAccountName '' -ResourceGroupName 'setup-sites-non-prod-resource-group' -ResourceGroupLocation 'australiasoutheast' -TemplateFile 'C:\Users\manjunathj\Documents\Study\ARM_OnlineSetup\bin\Debug\staging\ARM_OnlineSetup\azuredeploy.json' -TemplateParametersFile 
  
    'C:\Users\manjunathj\Documents\Study\ARM_OnlineSetup\bin\Debug\staging\ARM_OnlineSetup\azuredeploy.parameters.json' -ArtifactStagingDirectory '.' -DSCSourceFolder '.\DSC'
      17:40:28 - [ERROR] Get-AzureRmEnvironment : The term 'Get-AzureRmEnvironment' is not recognized 
      17:40:28 - [ERROR] as the name of a cmdlet, function, script file, or operable program. Check the 
      17:40:28 - [ERROR] spelling of the name, or if a path was included, verify that the path is 
      17:40:28 - [ERROR] correct and try again.
      17:40:28 - [ERROR] At line:1 char:176
      17:40:28 - [ERROR] + ... 'true' }; if ((Get-AzureRmEnvironment -Name 'AzureCloud') -eq $null) { 
      17:40:28 - [ERROR] Set-Azure ...
      17:40:28 - [ERROR] +                    ~~~~~~~~~~~~~~~~~~~~~~
      17:40:28 - [ERROR]     + CategoryInfo          : ObjectNotFound: (Get-AzureRmEnvironment:String)  
      17:40:28 - [ERROR]    [], CommandNotFoundException
      17:40:28 - [ERROR]     + FullyQualifiedErrorId : CommandNotFoundException
      17:40:28 - [ERROR]  
      17:40:28 - [ERROR] Add-AzureRMAccount : The term 'Add-AzureRMAccount' is not recognized as the 
      17:40:28 - [ERROR] name of a cmdlet, function, script file, or operable program. Check the 
      17:40:28 - [ERROR] spelling of the name, or if a path was included, verify that the path is 
      17:40:28 - [ERROR] correct and try again.
      17:40:28 - [ERROR] At line:1 char:602
      17:40:28 - [ERROR] + ... ws.net/'  }; ((Add-AzureRMAccount -SubscriptionId 
      17:40:28 - [ERROR] 'fa801c3f-d70d-49cf-84fe-1cc1d ...
      17:40:28 - [ERROR] +                    ~~~~~~~~~~~~~~~~~~
      17:40:28 - [ERROR]     + CategoryInfo          : ObjectNotFound: (Add-AzureRMAccount:String) [],  
      17:40:28 - [ERROR]    CommandNotFoundException
      17:40:28 - [ERROR]     + FullyQualifiedErrorId : CommandNotFoundException
      17:40:28 - [ERROR]  
      17:40:28 - [ERROR] C:\Users\manjunathj\Documents\Study\ARM_OnlineSetup\bin\Debug\staging\ARM_Onlin
      17:40:28 - [ERROR] eSetup\Deploy-AzureResourceGroup.ps1 : The term 'New-AzureRmResourceGroup' is 
      17:40:28 - [ERROR] not recognized as the name of a cmdlet, function, script file, or operable 
      17:40:28 - [ERROR] program. Check the spelling of the name, or if a path was included, verify 
      17:40:28 - [ERROR] that the path is correct and try again.
      17:40:28 - [ERROR] At line:1 char:3434
      17:40:28 - [ERROR] + $UI = 'VS-'; if (!(Test-Path 'C:\Users\manjunathj\AppData\Roaming\Windows 
      17:40:28 - [ERROR] Azure  ...
      17:40:28 - [ERROR] + 
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      17:40:28 - [ERROR] ~~~
      17:40:28 - [ERROR]     + CategoryInfo          : ObjectNotFound: (New-AzureRmResourceGroup:String 
      17:40:28 - [ERROR]    ) [Deploy-AzureResourceGroup.ps1], CommandNotFoundException
      17:40:28 - [ERROR]     + FullyQualifiedErrorId : CommandNotFoundException,Deploy-AzureResourceGro 
      17:40:28 - [ERROR]    up.ps1
      17:40:28 - [ERROR]  
      17:40:28 - 
      17:40:28 - Deploying template using PowerShell script failed.
  </code></pre>
  
  <p>PFB my json file for the template,</p>
  
  <pre><code>{  
   "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
   "contentVersion": "1.0.0.0",
   "parameters": {
   "setup-sites-non-prod-service-planName": {
    "type": "string",
    "defaultValue": "setup-sites-non-prod-service-plan",
    "minLength": 1
   },
  "setup-sites-non-prod-service-planSkuName": {
    "type": "string",
    "defaultValue": "F1",
    "allowedValues": [
      "F1",
      "D1",
      "B1",
      "B2",
      "B3",
      "S1",
      "S2",
      "S3",
      "P1",
      "P2",
      "P3",
      "P4"
    ],
    "metadata": {
      "description": "Describes plan's pricing tier and capacity. Check details at https://azure.microsoft.com/en-us/pricing/details/app-service/"
    }
  }
  },
  "variables": {
  "setup-remserv-com-au-npName": "[concat('setup-remserv-com-au-np', uniqueString(resourceGroup().id))]"
  },
  "resources": [
  {
    "name": "[variables('setup-remserv-com-au-npName')]",
    "type": "Microsoft.Web/sites",
    "location": "[resourceGroup().location]",
    "apiVersion": "2015-08-01",
    "dependsOn": [
      "[resourceId('Microsoft.Web/serverfarms', parameters('setup-sites-non-prod-service-planName'))]"
    ],
    "tags": {
      "[concat('hidden-related:', resourceId('Microsoft.Web/serverfarms', parameters('setup-sites-non-prod-service-planName')))]": "Resource",
      "displayName": "setup-remserv-com-au-np"
    },
    "properties": {
      "name": "[variables('setup-remserv-com-au-npName')]",
      "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('setup-sites-non-prod-service-planName'))]"
    }
  },
  {
    "name": "[parameters('setup-sites-non-prod-service-planName')]",
    "type": "Microsoft.Web/serverfarms",
    "location": "[resourceGroup().location]",
    "apiVersion": "2015-08-01",
    "sku": {
      "name": "[parameters('setup-sites-non-prod-service-planSkuName')]"
    },
    "dependsOn": [ ],
    "tags": {
      "displayName": "setup-sites-non-prod-service-plan"
    },
    "properties": {
      "name": "[parameters('setup-sites-non-prod-service-planName')]",
      "numberOfWorkers": 1
    }
  }
  ],
  "outputs": {}
  }
  </code></pre>