2
votes

Importing a Runbook already available in Azure Automation requires the use of -Force in PowerShell. While this works for some, I get the following error for others:

Import-AzureRmAutomationRunbook : BadRequest: Update runbook with definition of different runbook kind is not allowed

Checked everything about the runbook type etc. and all seems OK. If I delete the runbook, then import and after that re-import (overwrite with -Force) then I no longer get above message.

But I need to be able to 'overwrite' the Runbooks to preserve the Webhooks.

2

2 Answers

2
votes

There is a bug in ISE/Automation Add-on, which should be fixed soon. For the time being don't use ISE/Automation Add-on to upload runbooks. User portal or PowerShell Import-AzureRmAutomationRunbook form PowerShell (not from ISE).

0
votes

I had this issue. The problem was that the runbook which was supposed to be of type PowerShellWorkflow was earlier incorrectly imported as runbook of type PowerShell. After deleting and re-importing it worked fine for me.

Also, there was earlier a bug with the runbook cmdlets wherein the Get-AzureRmAutomationRunbook cmdlet returned the RunbookType value as Script instead of PowerShellWorkflow but as per the latest comment from the product team, it has been fixed.

Refer the discussion on github here.