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
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/