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 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
When you start a runbook in Azure Automation, it create a Azure automation job. A job is a single execution instance of a runbook. A job is then assigned to a Azure worker process, which then executes it. When you view the list of runbooks in the Azure portal, it will list the status of the last job that was started for each runbook.You can view the list of jobs for each runbook in order to track the status of each job. …Continue Reading
We can use PowerShell cmdlet Get-AzureRmAutomationRunbook to get runbooks associated with an automation account:
$resourceGroupName = "enggdevsoutheastasia" $automationAccountName = "AzureAutomation" $runbookName = "start-azurevms" Get-AzureRmAutomationRunbook -automationAccountName $automationAccountName ` -resourceGroupName $resourceGroupName
Similarly, we can use cmdlet Start-AzureRmAutomationRunbook …Continue Reading
Today, we’ll see how we can leverage Azure Automation to stop/start virtual machines in Azure. We’ll begin with how to start virtual machine first and same steps can be applied to stop virtual machines. You’ll only need to change few commands in the runbook associated.
Login into Azure Resource Manager with your credentials. Click on Azure Automation account and then click on the runbooks section highlighted …Continue Reading
What is Azure Automation?
As its almost clear from name, Azure Automation provides a way for users to automate the manual, long-running tasks in the Azure environment. It saves time, humane errors and increases the reliability of day to day administrative tasks in Azure. It is also possible to schedule these automated processes to run at specific intervals.
You can automate processes using runbooks or automate configuration management using Desired State Configuration …Continue Reading