Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hosting powershell inside ASP.NET web application

I hope this doesn't fall into the non question category.

I would like to host a powershell environment inside my ASP.NET application, running in the same process as the Application Pool, and be able to remotely connect to the hosted environment. I already have a dll with my custom Cmdlets that I would also like to use inside my hosted session.

Note that I'm not just looking to run arbitrary commands inside ASP.NET. Instead, I want to have a full shell like interface where I can work in.

I've looked at fan-in and creating/pooling Runspaces, but this is too vague and I can't seem to find good information on this specific scenario. So any pointers would be really helpful.

like image 891
Pedro Avatar asked May 24 '26 05:05

Pedro


1 Answers

Take a look at PowerShellASP - part of the product suite listed at http://www.powershellinside.com. That should allow you to host PowerShell with ASP.NET. Another option (if you want to mix ASP.NET and PowerShell in the same page) would be the PowerShell Panel: http://www.powershellinside.com/powershell/panel/

like image 92
eric Avatar answered May 25 '26 19:05

eric