Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

PowerShell module into SQL Server Expand / Collapse
Author
Message
Posted Tuesday, December 10, 2013 1:44 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, April 07, 2014 12:19 PM
Points: 51, Visits: 504
Hello,

I'm trying to find a way to burry my PS module into extended stored procedure(XP) in sql server.

Any help in guiding me in this direction is highly appreciated.

Thanks in Advance
Jagan K


Thanks
Jagan K
Post #1521663
Posted Tuesday, December 10, 2013 9:38 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 3:40 PM
Points: 1,077, Visits: 1,496
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.
Post #1521733
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse