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 'firstname.lastname@example.org' -EnvironmentName 'AzureC...[ERROR]+~~~~~~~~~~~~~~~~[ERROR]+CategoryInfo:InvalidArgument:(:)[Add-AzureRmAccount],Param[ERROR] eterBindingException
[ERROR]+FullyQualifiedErrorId:NamedParameterNotFound,Microsoft.Azure.Commands.[ERROR]Profile.AddAzureRMAccountCommand[ERROR][ERROR]RunLogin-AzureRmAccount to login.
As discussed in one of the previous blog posts, we can use PowerShell to help create persistent logins. Now consider scenario, where you have access to multiple azure subscriptions. Off course, you can download and save AzureRM profile for each one of the them. However, there are two major issues:
AzureRM profile downloaded is associated with a token by default and it expires in a few days.
If you have too many subscriptions, it can be tiresome to first select subscription and then save the profile.
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 Automation has been migrated to new Azure resource manager portal at https://portal.azure.com. If you happen to open Azure Automation accounts in Classic portal, you would see a message like below:
Azure virtual machines have a variety of built-in extensions that can enable configuration management. There are two extensions for Windows PowerShell. The custom script extension allows you to run a script on a virtual machine at provisioning time or after it is running. The Windows PowerShell DSC Extension allows you to define the state of a virtual machine using the PowerShell Desired State Configuration language and apply it. There are also extensions that allow you to configure your virtual machines to use open source configuration management utilities such as Chef or Puppet …Continue Reading