• Extended stored procedures only support C# and VB languages (also you should be using SQLCLR instead of XPs). You might be able to do it by calling powershell from C# as per this article http://www.codeproject.com/Articles/18229/How-to-run-PowerShell-scripts-from-C

    However, you're probably better off enabling xp_cmdshell and running powershell from there in a regular stored procedure.