Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Run POwershell script in Store Proc

$
0
0
hi Friends,I was wondering if anyone of you have come across situation to run a powershell Script with parameter Store Proc. I'm able to run a powershell Script using below command but i need to run powershell with input parameter.Working Fine: [code="sql"]EXEC xp_cmdshell 'powershell -Command D:\Temp\Get-Service.ps1'[/code]Failing and Need Help: [code="sql"]EXEC xp_cmdshell 'powershell -Command "MyServerName" | "D:\Temp\StopSDOpsService.ps1"'[/code]

Viewing all articles
Browse latest Browse all 3145

Trending Articles