Currently I am engaged in doing automation utilizing Azure Automation Accounts so want to share important HIGH level first steps that you have to preform so that you can connect the PowerShell ISE terminal directly to Azure Automation.
You might already be having Azure Automation account but if not then let’s create one.
Go to https://portal.azure.com –> Search for Automation and hit Automation Accounts.
Click ADD, select the subscription and Create Azure Run As Account
Install-Module -Name AzureAutomationAuthoringToolkit
Ones installed, open PowerShell ISE and import this module
Import-Module -Name AzureAutomationAuthoringToolkit (you will see the side bar as below will come up)
Click on SignIn to Sign in to your Azure Account, it will start retrieving subscription and automation accounts
Now click on Run Books, create a run book (I created a script runbook)
Now you can start writing Powershell code in ISE instead of using web editor in Azure which does not have any functionalities that are required by scripters.
Ones the code is written, you can use, upload draft, test draft in Azure, Publish draft actions.
When you will click test draft in Azure a new window will open where you can click start new job to run the code.
Now if you log in directly to Azure Automation, you can see this run book.
Note: To edit existing run book, if you do not see it, just type its name in search under runbooks, ISE will retrieve it.
Play with it for a bit to get comfortable and you will start using it often as you are getting features of ISE which you will be deprived of if you are directly using Azure web editor.
Thanks for reading…