An Azure service that is used to automate, configure, and install updates across hybrid environments.
Cannot Invoke a child runbook using inline execution
Trying to follow these articles to invoke a runbook inline from another runbook.
https://learn.microsoft.com/en-us/azure/automation/automation-child-runbooks
https://learn.microsoft.com/en-us/system-center/sma/link-runbooks?view=sc-sma-2022&source=docs#invoke-a-child-runbook-using-inline-execution.
The articles say "To invoke a runbook inline from another runbook, you use the name of the runbook and provide values for its parameters exactly like you would use an activity or cmdlet". The example they give is:
$vm = Get-VM -Name "MyVM" -ComputerName "MyServer"
$output = .\Test-ChildRunbook.ps1 -VM $vm -RepeatCount 2 -Restart $true
I'm trying:
$pnpExc = Get-PnPException;
$output = .\Log-PnPException.ps1 -PnPException $pnpExc -Operation 'Get Site Pages Library';
The child Log-PnPException runbook was published before the parent runbook was published.
Both parent and child are PowerShell runbook type so .\ precedes the the child runbook name when calling.
The error is:
| The term '.\Log-PnPException.ps1' is not recognized as a name of a
| cmdlet, function, script file, or executable program. Check the spelling
| of the name, or if a path was included, verify that the path is correct
| and try again.