Select * from xPM_Extract
Done formatting, Sorry about that.
It's ok...so you're calling a powershell script from a sql stored procedure it looks like?
Is that literally the full powershell script you posted? it seems like there is more that is missing.
I updated question to display Power Shell query.
Ok, well in that case the powershell portion works as expected when used entirely from powershell....so that means the problem is in the sql side of things.
Maybe someone who knows more about SQL will come along although this is a pretty unlikely scenario you are doing. You may be better off finding a sql forum to post this question in...maybe stack overflow
The only suggestion I can offer at this point would be to consider doing whatever it is you are trying to accomplish entirely in powershell...you can get module to let you interact with SQL from PS here:
I will post it to stackoverflow
Powered by IDERA