I was trying to execute Invoke-Sqlcmd command inside a Linux Agent in Azure DevOps Pipelines and getting this error.
"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."
The term 'Invoke-Sqlcmd' is not recognized... |
- task: PowerShell@2 inputs: targetType: 'inline' script: 'Install-Module -Name SqlServer -AllowPrerelease'
"WARNING: User declined to install module (SqlServer)."
WARNING: User declined to install module (SqlServer) |
- task: PowerShell@2 inputs: targetType: 'inline' script: 'Install-Module -Name SqlServer -AllowPrerelease -Force -Verbose -Scope CurrentUser'
Install-Module -Name SqlServer |
Invoke-SqlCmd is running |
Hope this helps!
Happy Coding.
Regards,
Jaliya
No comments:
Post a Comment