1

I have been searching high and low and I can't even find a simple method to just list runbooks using powershell... I have 4 subscriptions and several automation accounts in each subscriptions, it can be tedious when I'm trying to find a particular runbook, browsing through the console. So if anyone knows a simple way to list automation accounts and then their runbooks, so I could potentially create a simple loop to cycle through my subscriptions this would be extremely beneficial.

Thanks. Josh

1 Answers1

1

Something like the following should work for you. You would obviously have to add authentication and a subscription switcher for Azure RM.

foreach ($account in Get-AzureRMAutomationAccount){
Get-AzureRmAutomationRunbook -ResourceGroupName $account.ResourceGroupName -AutomationAccountName $account.AutomationAccountName
}
CtrlDot
  • 2,463
  • 14
  • 11