MicrosoftLearning / dp-300-database-administrator

Repository for lab exercises and instructions for Microsoft DP-300 learning content
https://microsoftlearning.github.io/dp-300-database-administrator/
MIT License
66 stars 77 forks source link

Lab13-Automation Runbook #41

Open tylerfarmer1 opened 3 months ago

tylerfarmer1 commented 3 months ago

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:

image

Here's the text of the error message: Invoke-Sqlcmd: C:\usr\src\tmp\eb604bd7-581f-4412-8291-fff8b0fd6878\runbooks\Indexv2.ps1:5 Line |  5 |  $SQLOutput = $(Invoke-Sqlcmd -ServerInstance $AzureSQLServerName -Use …  |  ~~~~~  | The term 'Invoke-Sqlcmd' 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. 

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.

tylerfarmer1 commented 1 month ago

Any thoughts on this? I opened this ticket 2 months ago.