Azure Resource Group Error: A parameter cannot be found that matches parameter name ‘EnvironmentName’

Recently, if you have been trying to deploy Azure Resource Group template using Visual Studio, you might see below error:

[ERROR] Add-AzureRmAccount : A parameter cannot be found that matches parameter name 
[ERROR] 'EnvironmentName'.
[ERROR] At line:1 char:2379
[ERROR] + ... xmg' -AccountId '' -EnvironmentName 'AzureC ...
[ERROR] +                                                  ~~~~~~~~~~~~~~~~
[ERROR]     + CategoryInfo          : InvalidArgument: (:) [Add-AzureRmAccount], Param 
[ERROR]    eterBindingException
[ERROR]     + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.Azure.Commands. 
[ERROR]    Profile.AddAzureRMAccountCommand
[ERROR] Run Login-AzureRmAccount to login.

Continue reading “Azure Resource Group Error: A parameter cannot be found that matches parameter name ‘EnvironmentName’”

Persistant Azure PowerShell Logins

While doing azure automation from some time, I have found that I have to login each time I run a new PowerShell session. This is irritating while writing and executing scripts. You can do this manually by configuring the management certificate and subscription details with the Set-AzureSubscription and Select-AzureSubscription cmdlets or automatically by downloading the PublishSettings file from Windows Azure and importing it. In this blog post, we’ll see how to automate the login process for Microsoft Azure so that our script can run without any manual intervention.  Continue reading “Persistant Azure PowerShell Logins”

Azure Certification: Where to Start? 2016 Edition

The choice of choosing which certification to obtain can be a tricky one, especially if you’ve never studied for or taken a Microsoft Certification exam before. It can also be daunting if you don’t know anyone else who has done it either. You shouldn’t let this discourage you. It may be a bit confusing, but it’s actually not all that complicated. Check this article for more details:

It outlines some …Continue Reading

Create SharePoint 2016 Dev/test farm in Azure

In this post, we’ll discuss the steps required to create SharePoint Server 2016 dev/test farm hosted in Microsoft Azure. We’ll have minimum configuration which is to have a domain controller, a sql server and a SharePoint server. Do note that all of the 3 servers need to be in the same subnet and vnet so that they can connect to each other using internal IP address for them. We off course  don’t want to redirect our traffic through firewalls for NSG (network security group). So all of these 3 servers will be in the same NSG for simplicity of deployment. …Continue Reading

Identify VM’s running status in Azure Resource Manager

Unlike classic model, there is no direct cmdlet to know the status for virtual machine provisioned using resource manager model. We can use the following commands to know the status of a particular virtual machine:

$resourceGroupName = "sharepointvms"
$vmName = "indspstd01"
$vmStatuses = $(Get-AzureRmVM -ResourceGroupName $resourceGroupName -VMName $vmName -Status).Statuses
foreach($vmStatus in $vmStatuses){
 if($vmStatus.Code -ne "ProvisioningState/succeeded")
 Write-Output "$vmName status is `"$($vmStatus.displaystatus)`""

Replace the value of …Continue Reading

Creating an user account named administrator in Azure VM

We all know that while creating a virtual machine in Microsoft Azure (whether in classic or resource manager portal), it won’t allow to create an administrative user account named as ‘administrator’ at the time of provisioning. Not that its a good practice anyway and security pro’s have been advising to not create it from a long time. However some old legacy applications might not work if it does not exist. So once the virtual machine is provisioned, you can go ahead and create it fine using local users and groups console (or you can use shortcut lusrmgr.msc).  …Continue Reading

Configure Azure Automation hybrid runbook workers and run hybrid runbooks

Azure automation is Microsoft cloud based workflow engine that can be used to run workflows in Azure. It started out its life as engine to operate against azure resources. However with time it gained the capability to run against on-premises resources as well by introduction of new feature called hybrid runbook workers.

You can think of hybrid runbook workers as one or more servers (think high availability) in your on-premise datacenter that can act on behalf of runbooks located in azure cloud. It has the capability to execute a runbook (known as hybrid runbook) which can be as simple as PowerShell script or as complex as a PowerShell workflow can be. So you can use it to to orchestrate complex, repetitive, or time-consuming tasks for your on-premise servers. …Continue Reading