PowerShell ASP - Too cool!

PowerShell ASP - Too cool!

  • Comments 14

For the longest time, people have been asking me when they'll be able to use PowerShell in ASP.  It makes perfect sense - PowerShell is a great language that let's you do amazing things quickly.  Sadly, my answer has always been:

At Microsoft, to ship is to choose.

We are trying to solve the problem of administrating and automating Windows and until we get things like Remoting, Jobs, Eventing, etc done, it would be a breach of our responsibilities to pursue ASP programming no matter how cool and useful it would be.  Now let me be clear, I believe ASP programming is SUPER useful to Admins (as well as everyone else).  It is just that we need to do first things first.

So now to the great news:  The superstars at NSoftware have finally solved this problem and published PowerShellASP.  Here is their description of it:

PowerShellASP is an ASP-like template language for Web Applications; templates contain a mixture of markup (HTML, XML or whatever you want to generate) and inline PowerShell code. At runtime, templates/pages are fully translated to PowerShell code and executed as a single unit inside a PowerShell pipeline, with the results sent to the client browser.

PowerShellASP runs off the ASP.NET platform, implemented as a custom IHttpHandler mapped to *.ps1x files. Because of this, you can mix PowerShellASP pages alongside any ASP.NET application. This provides a great way to leverage PowerShellASP inside your existing applications as needed or you can create complete applications from scratch based only on *.ps1x pages.

 Are you drooling yet?  If not, check out this example:

      <% get-process | foreach { %> 
      <% } %>

Is that awesome or what? 
Still not drooling?  Check this out:  it's FREE!
I told you they were superstars!
Download it and blog about your experiences - I'd love to hear what you think.

BTW:  NSoftware is also ships NetCmdlets, a rich collection of cmdlets to deal a wide range of protocols including SSH and SNMP.  Did you know that you can do remote PowerShell over SSH today?  With NetCmdlets you can.  Check those out HERE.


Jeffrey Snover [MSFT]
Windows Management Partner Architect
Visit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShell
Visit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx



Leave a Comment
  • Please add 2 and 6 and type the answer here:
  • Post
  • Looks like they beat me to it as far as completion is concerned.  I posted something nearly exactly like this up on Codeplex a few days before it was released.

    It is indeed a very cool idea.

  • In the configuration section of their web site, it says that one must first add a reference to the the PowerShellASP assembly: PowerShellToys.PowerShellASP.dll

    Does someone know how to do it?

    Thank you!

  • Andre, you did powerpages?  I was up there and didn't see any released binaries but maybe I didn't look in the right place.  We mention both you and poshasp on the upcoming powerscripting podcast.

  • Well I remember that speech from you, face-to-face!  Good on Gent, Eric, and the rest of the boys from /n software. Not a better company to offer it. Wish I were still using Windows servers...

  • PowerShellASP 公開中(PowerShellでWebサイト)

  • My latest in a series of the weekly, or more often, summary of interesting links I come across related to Visual Studio. Entrian Solutions is the publisher of a new add-in for Visual Studio 2005-2008 called Entrian Source Search . The tool provides an

  • Young,

    Adding a reference implies you're doing a project within Visual Studio (usually).  So you're writing  an ASP.NET app in C# or VB.NET.  If I remember correctly, you can simply right-click on the project to add the reference to the DLL to your project.

    Clear enought?

  • I started my own implementations of IActiveScript and IActiveScriptParse around PowerShell.  Even though it was kind of fun, I guess I'll just download theirs.

  • Oh, I guess it's just a handler for ASP.NET.  Back to the fun, then.  :-)

  • though its very cool for a toy, its scary for real life, because it is not sandboxed , not to mention though powershell is great , its not preformant enough for this sort of thing in production.

  • I tend to agree with Karl but, anyhow, this could make for building a whole set of quick-and-dirty admin tools over the web... which would likely behind authentication. Or even a REST-full management API... way more quick to integrate with from anything that does not talk SOAPy WS-Man ;-)

  • Link to powershelltoys.com doesn't work anymore.  :(

  • I believe this is the updated link. There is a free version that only allows a single session and paid versions that allow multiple concurrent sessions.

  • Forgot the link: www.powershellserver.com/.../web

Page 1 of 1 (14 items)