Quick Fix for Visual Studio and Azure PowerShell 1.0

Azure Powershell version 1.0.1 has been released. it introduces a new verb-noun combination (xxx-AzureRmxxx).
See https://azure.microsoft.com/en-us/blog/azps-1-0-pre/ for more details.
As a result visual studio has some issues right now to deploy ARM templates since it has no knowledge at all of these new commands.If you want to keep working like you used to do, you can uninstall the azure 1.0.1 module and reinstall the standalone package of Azure module 0.9.8.
But if you still want to play around with the new module and keep working with visual studio deployment, you just need to modify the Deploy-AzureRessourceGroup.ps1 script.
In addition Visual Studio does not know yet how to log in to ARM, it does not use the Add-AzureRmAccount so it need to be added into the script and set manually at least once in your visual studio instance.
here is my modified Deploy-AzureRessourceGroup.ps1
#Requires -Version 3.0 Param ( [string][Parameter(Mandatory = $true)] $ResourceGroupLocation, [string]$ResourceGroupName = '$defaultResourceGroupName$', [switch]$UploadArtifacts, [string]$StorageAccountName, [string]$StorageAccountResourceGroupName, [string]$StorageContainerName = $ResourceGroupName.ToLowerInvariant() + '-stageartifacts', [string]$TemplateFile = '..Templates$deployTemplateFileName$.json', [string]$TemplateParametersFile = '..Templates$deployTemplateFileName$.parameters.json', [string]$ArtifactStagingDirectory = '..binDebugstaging', [string]$AzCopyPath = '..ToolsAzCopy.exe', [string]$DSCSourceFolder = '..DSC' ) Import-Module Azure -ErrorAction SilentlyContinue Add-AzureRmAccount try { [Microsoft.Azure.Common.Authentication.AzureSession]::ClientFactory.AddUserAgent("VSAzureTools-$UI$($host.name)".replace(" ", "_"), "2.7.2") } catch { } Set-StrictMode -Version 3 $OptionalParameters = New-Object -TypeName Hashtable $TemplateFile = [System.IO.Path]::Combine($PSScriptRoot, $TemplateFile) $TemplateParametersFile = [System.IO.Path]::Combine($PSScriptRoot, $TemplateParametersFile) if ($UploadArtifacts) { # Convert relative paths to absolute paths if needed $AzCopyPath = [System.IO.Path]::Combine($PSScriptRoot, $AzCopyPath) $ArtifactStagingDirectory = [System.IO.Path]::Combine($PSScriptRoot, $ArtifactStagingDirectory) $DSCSourceFolder = [System.IO.Path]::Combine($PSScriptRoot, $DSCSourceFolder) Set-Variable ArtifactsLocationName '_artifactsLocation' -Option ReadOnly Set-Variable ArtifactsLocationSasTokenName '_artifactsLocationSasToken' -Option ReadOnly $OptionalParameters.Add($ArtifactsLocationName, $null) $OptionalParameters.Add($ArtifactsLocationSasTokenName, $null) # Parse the parameter file and update the values of artifacts location and artifacts location SAS token if they are present $JsonContent = Get-Content $TemplateParametersFile -Raw | ConvertFrom-Json $JsonParameters = $JsonContent | Get-Member -Type NoteProperty | Where-Object { $_.Name -eq "parameters" } if ($JsonParameters -eq $null) { $JsonParameters = $JsonContent } else { $JsonParameters = $JsonContent.parameters } $JsonParameters | Get-Member -Type NoteProperty | ForEach-Object { $ParameterValue = $JsonParameters | Select-Object -ExpandProperty $_.Name if ($_.Name -eq $ArtifactsLocationName -or $_.Name -eq $ArtifactsLocationSasTokenName) { $OptionalParameters[$_.Name] = $ParameterValue.value } } $StorageAccountKey = (Get-AzureRMStorageAccountKey -ResourceGroupName $StorageAccountResourceGroupName -Name $StorageAccountName).Key1 $StorageAccountContext = (Get-AzureRmStorageAccount -ResourceGroupName $StorageAccountResourceGroupName -Name $StorageAccountName).Context # Create DSC configuration archive if (Test-Path $DSCSourceFolder) { Add-Type -Assembly System.IO.Compression.FileSystem $ArchiveFile = Join-Path $ArtifactStagingDirectory "dsc.zip" Remove-Item -Path $ArchiveFile -ErrorAction SilentlyContinue [System.IO.Compression.ZipFile]::CreateFromDirectory($DSCSourceFolder, $ArchiveFile) } # Generate the value for artifacts location if it is not provided in the parameter file $ArtifactsLocation = $OptionalParameters[$ArtifactsLocationName] if ($ArtifactsLocation -eq $null) { $ArtifactsLocation = $StorageAccountContext.BlobEndPoint + $StorageContainerName $OptionalParameters[$ArtifactsLocationName] = $ArtifactsLocation } # Use AzCopy to copy files from the local storage drop path to the storage account container & $AzCopyPath """$ArtifactStagingDirectory""", $ArtifactsLocation, "/DestKey:$StorageAccountKey", "/S", "/Y", "/Z:$env:LocalAppDataMicrosoftAzureAzCopy$ResourceGroupName" if ($LASTEXITCODE -ne 0) { return } # Generate the value for artifacts location SAS token if it is not provided in the parameter file $ArtifactsLocationSasToken = $OptionalParameters[$ArtifactsLocationSasTokenName] if ($ArtifactsLocationSasToken -eq $null) { # Create a SAS token for the storage container - this gives temporary read-only access to the container $ArtifactsLocationSasToken = New-AzureStorageRmContainerSASToken -Container $StorageContainerName -Context $StorageAccountContext -Permission r -ExpiryTime (Get-Date).AddHours(4) $ArtifactsLocationSasToken = ConvertTo-SecureString $ArtifactsLocationSasToken -AsPlainText -Force $OptionalParameters[$ArtifactsLocationSasTokenName] = $ArtifactsLocationSasToken } } # Create or update the resource group using the specified template file and template parameters file New-AzureRMResourceGroup ` -Name $ResourceGroupName ` -Location $ResourceGroupLocation ` -Verbose -Force -ErrorAction Stop Test-AzureRmResourceGroupDeployment ` -ResourceGroupName $ResourceGroupName ` -TemplateFile $TemplateFile ` -TemplateParameterFile $TemplateParametersFile ` @OptionalParameters ` -ErrorAction Stop New-AzureRMResourceGroupDeployment ` -Name ((Get-ChildItem $TemplateFile).BaseName + '-' + ((Get-Date).ToUniversalTime()).ToString('MMdd-HHmm')) ` -ResourceGroupName $ResourceGroupName ` -TemplateFile $TemplateFile ` -TemplateParameterFile $TemplateParametersFile ` @OptionalParameters ` -Verbose -Force