How to call SQLPS from TSql in SQL Server 2008 How to call SQLPS from TSql in SQL Server 2008 powershell powershell

How to call SQLPS from TSql in SQL Server 2008


Something like this:

set @sql = 'powershell.exe -file "YourScript.ps1" -nologo'EXEC xp_cmdshell @sql