4

I have an ASP.Net application which can run embedded runspaces for which I have built a fairly extensive PowerShell functionality including:

  • Interactive console, and Web base ISE-like UI
  • a number of commandlets exposing the app functionality & management
  • a PS drive provider to browse the app content... etc.

The trouble is that I need that functionality to be accessible by Windows PowerShell Console to be available to build scripts or configuration scripts etc., so I would need to expose such an embedded runspace externally via PowerShell remoting. I know of the existence of PowerShellTunnel and the remoting verver that preceeded this but those solutions are limited. I would need to expose the full functionality of such runspace to the external scripts e.g. in interactive mode, I have the Web/in-app interactivity sorted. But to have the full story I need the remoting part.

Has anyone done this and could you point me in a direction where I can find how can I enable remote (or even local) Windows Powershell console to be able to create a proper connection to my app?

Adam Najmanowicz
  • 1,200
  • 6
  • 10

1 Answers1

0

What about using an Http channel like Scott Hanselman wrote about some time ago?

http://www.hanselman.com/blog/ScriptBlockAndRunspaceRemotingInPowerShell.aspx

Coding101
  • 527
  • 7
  • 18
  • Unfortunately this doesn't seem to be solving the problem of interactivity. It looks similar to what can be solved with http://archive.msdn.microsoft.com/PowerShellTunnel/. http://powershellremoting.codeplex.com/ is also interesting. Overall breaking out of the confines of the web-app seems a bit tough. – Adam Najmanowicz Aug 05 '13 at 06:54
  • Accepting the answer as I believe there isn't a better way for now and the fact that Hanselman is struggling with it helped me realise it :) – Adam Najmanowicz Aug 05 '13 at 07:01