I have done all the steps of the following tutorial to have a runbook for automating index and statistic maintenance:
I was able to complete all the tutorial without errors, but when I execute the runbook, it returns me an error:
Invoke-Sqlcmd : The term 'Invoke-Sqlcmd' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:6 char:16
+ $SQLOutput = $(Invoke-Sqlcmd -ServerInstance $AzureSQLServerName -Use ...
+ ~~~~~~~~~~~~~
+ CategoryInfo: ObjectNotFound: (Invoke-Sqlcmd:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
What can I do? I use SQL Server with Azure. Specifically, Azure SQL Database with pricing/model tier "S4 Standard (200 DTUs)".