Invoke-Sqlcmd unable to run

前端 未结 4 1775
一向
一向 2021-01-04 14:13

I have a PowerShell script that checks the CPU level of the server it is running on, and then if it is above a certain threshold it will run a SQL stored procedure and e-mai

4条回答
  •  旧巷少年郎
    2021-01-04 14:36

    Make sure you've installed Powershell module with SQL Server:

    Then try to import module SQLPS:

    Import-Module SQLPS
    

    See also: https://blogs.msdn.microsoft.com/psssql/2008/09/02/sql-server-2008-management-tools-basic-vs-complete-explained/

提交回复
热议问题