{"id":5701,"date":"2008-07-18T18:18:00","date_gmt":"2008-07-18T18:18:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2008\/07\/18\/powershell-asp-too-cool\/"},"modified":"2019-02-18T13:13:06","modified_gmt":"2019-02-18T20:13:06","slug":"powershell-asp-too-cool","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/powershell-asp-too-cool\/","title":{"rendered":"PowerShell ASP &#8211; Too cool!"},"content":{"rendered":"<p>For the longest time, people have been asking me when they&#8217;ll be able to use PowerShell in ASP.&nbsp; It makes perfect sense &#8211; PowerShell is a great language that let&#8217;s you do amazing things quickly.&nbsp; Sadly, my answer has always been:<\/p>\n<blockquote>\n<p>At Microsoft, to ship is to choose.<\/p>\n<\/blockquote>\n<p>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.&nbsp; Now let me be clear, I believe ASP programming is SUPER useful to Admins (as well as everyone else).&nbsp; It is just that we need to do first things first.<\/p>\n<p>So now to the great news:&nbsp; The superstars at <a class=\"\" href=\"http:\/\/www.nsoftware.com\/\">NSoftware<\/a> have finally solved this problem and published <a class=\"\" href=\"http:\/\/www.powershelltoys.com\/default.aspx\">PowerShellASP<\/a>.&nbsp; Here is their description of it:<\/p>\n<blockquote>\n<p class=\"style1\">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.<\/p>\n<p class=\"style1\">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.<\/p>\n<\/blockquote>\n<p class=\"style1\">&nbsp;Are you drooling yet?&nbsp; If not, check out this example:<\/p>\n<p class=\"style1\">&lt;html&gt;<br \/>&nbsp; &lt;body&gt;<br \/>&nbsp;&nbsp;&nbsp; &lt;table&gt;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;tr&gt;&lt;td&gt;ID&lt;\/td&gt;&lt;\/tr&gt;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;% get-process | foreach { %&gt;&nbsp;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;tr&gt;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td&gt;&lt;%=$_.ID%&gt;&lt;\/td&gt;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td&gt;&lt;%=$_.ProcessName%&gt;&lt;\/td&gt;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/tr&gt;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;% } %&gt;<br \/>&nbsp;&nbsp;&nbsp; &lt;\/table&gt;<br \/>&nbsp; &lt;\/body&gt;<br \/>&lt;\/html&gt;<\/p>\n<p class=\"style1\">Is that awesome or what?&nbsp; <br \/>Still not drooling?&nbsp; Check this out:&nbsp; it&#8217;s FREE!<br \/>I told you they were superstars!<br \/>Download it and blog about your experiences &#8211; I&#8217;d love to hear what you think.<\/p>\n<p class=\"style1\">BTW:&nbsp; <a class=\"\" href=\"http:\/\/www.nsoftware.com\/\">NSoftware<\/a> is also ships NetCmdlets, a rich collection of cmdlets to deal a wide range of protocols including SSH and SNMP.&nbsp; Did you know that you can do remote PowerShell over SSH today?&nbsp; With NetCmdlets you can.&nbsp; Check those out <a class=\"\" href=\"http:\/\/www.nsoftware.com\/powershell\/\">HERE<\/a>.<\/p>\n<p class=\"style1\">Enjoy!<\/p>\n<p class=\"style1\">Jeffrey Snover [MSFT]<br \/>Windows Management Partner Architect<br \/>Visit the Windows PowerShell Team blog at:&nbsp;&nbsp;&nbsp; <a href=\"http:\/\/blogs.msdn.com\/PowerShell\">http:\/\/blogs.msdn.com\/PowerShell<\/a><br \/>Visit the Windows PowerShell ScriptCenter at:&nbsp; <a href=\"http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx\">http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx<\/a><\/p>\n<p class=\"style1\">&nbsp;<\/p>\n<p class=\"style1\">&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For the longest time, people have been asking me when they&#8217;ll be able to use PowerShell in ASP.&nbsp; It makes perfect sense &#8211; PowerShell is a great language that let&#8217;s you do amazing things quickly.&nbsp; Sadly, my answer has always been: At Microsoft, to ship is to choose. We are trying to solve the problem [&hellip;]<\/p>\n","protected":false},"author":600,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5701","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"blog_post_summary":"<p>For the longest time, people have been asking me when they&#8217;ll be able to use PowerShell in ASP.&nbsp; It makes perfect sense &#8211; PowerShell is a great language that let&#8217;s you do amazing things quickly.&nbsp; Sadly, my answer has always been: At Microsoft, to ship is to choose. We are trying to solve the problem [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/5701","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=5701"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/5701\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=5701"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=5701"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=5701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}