The lab works correctly as written, but that's because you don't actually execute the runbook. I've tried with both PowerShell Runtime 7.1 and 7.2, and either way the runbook does not execute correctly. It has an issue with the term "Invoke-Sqlcmd.' You get an exception like this:
Here's the text of the error message:
[91mInvoke-Sqlcmd: [0mC:\usr\src\tmp\eb604bd7-581f-4412-8291-fff8b0fd6878\runbooks\Indexv2.ps1:5 [96mLine | [96m 5 | [0m $SQLOutput = $([96mInvoke-Sqlcmd[0m -ServerInstance $AzureSQLServerName -Use … [96m | [91m ~~~~~ [91m[96m | [91mThe term 'Invoke-Sqlcmd' is not recognized as a name of a [96m | [91mcmdlet, function, script file, or executable program. Check [96m | [91mthe spelling of the name, or if a path was included, verify [96m | [91mthat the path is correct and try again. [0m
It would be nice to execute the runbook and not have any errors. I'm just not familiar enough to know what the issue is with PowerShell.
Lab 13-Automation Runbook
The lab works correctly as written, but that's because you don't actually execute the runbook. I've tried with both PowerShell Runtime 7.1 and 7.2, and either way the runbook does not execute correctly. It has an issue with the term "Invoke-Sqlcmd.' You get an exception like this:
Here's the text of the error message: [91mInvoke-Sqlcmd: [0mC:\usr\src\tmp\eb604bd7-581f-4412-8291-fff8b0fd6878\runbooks\Indexv2.ps1:5 [96mLine | [96m 5 | [0m $SQLOutput = $([96mInvoke-Sqlcmd[0m -ServerInstance $AzureSQLServerName -Use … [96m | [91m
~~~~~ [91m[96m | [91mThe term 'Invoke-Sqlcmd' is not recognized as a name of a [96m | [91mcmdlet, function, script file, or executable program. Check [96m | [91mthe spelling of the name, or if a path was included, verify [96m | [91mthat the path is correct and try again. [0mIt would be nice to execute the runbook and not have any errors. I'm just not familiar enough to know what the issue is with PowerShell.