header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

[August 25th, 2008] Check the home page regarding PowerShell related news from a brand new sponsor: Idera

Embedding PowerShell script in HTML page?
Last Post 14 Jun 2008 02:47 PM by jbrinkman. 5 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
PoshoholicUser is Offline
PowerShell MVP
New Member
New Member
Posts:38
Avatar

--
10 Jun 2008 09:14 PM  

Hi gang,

I'm at TechEd at the PowerShell demo station with an admin asking if it is possible to embed PowerShell script within an HTML page.  I know I've seen something in this area in the blogosphere before but can't think of where right now.  Anyone have any input or links that they can share?

Kirk out.

halr9000User is Offline
PowerShell MVP, Site Admin
Basic Member
Basic Member
Posts:335
Avatar

--
11 Jun 2008 03:26 PM  
Kirk, go talk to the /N guys...I can't say any more.
Community Director, PowerShellCommunity.org
Co-host, PowerScripting Podcast
Author, TechProsaic
marco.shawUser is Offline
Co-Community Director
Basic Member
Basic Member
Posts:195
Avatar

--
11 Jun 2008 03:43 PM  

Well, how advanced are we talking about?  You're going to need something dynamic like ASP or ASP.NET to be able to make either a call to powershell.exe or the PowerShell APIs.

--PowerShell APIs, see the 3 part series here:
http://devinfra-us.blogspot.com/2008/05/powershell-and-aspnet-part-3.html

--powershell.exe:
Just simply wrapping some of the code (in an ASP page with the <% and %>) from here might do:
http://blog.sapien.com/index.php/2006/12/26/more-fun-with-scheduled-powershell/

Since you're looking to run powershell.exe, you may be able to use just about any "interface" though to run powershell.exe with the proper args.

 

 

Marco

*Microsoft MVP - Windows PowerShell: http://www.microsoft.com/mvp
*PowerGadgets MVP: http://www.powergadgets.com/mvp
*Blog: http://marcoshaw.blogspot.com
KarlUser is Offline
New Member
New Member
Posts:11
Avatar

--
11 Jun 2008 05:40 PM  
the problem (other than powershell preformance) is that powershell can't sufficently be sandboxed, so its dangerous, but still maybe useful for admin use if there is definate authentication going on in the host app and it gets proxied.
JaykulUser is Offline
New Member
New Member
Posts:31

--
12 Jun 2008 04:28 AM  
This one, too.
http://www.leastprivilege.com/HostingPowerShellInASPNET.aspx

All I know is -- if you want PowerShell in ASP.Net, you should:
1) do it via the hosting APIs (and should look at the new stuff in v2 CTP)
2) not allow users to choose which cmdlets to run
3) validate input carefully
jbrinkmanUser is Offline
New Member
New Member
Posts:5

--
14 Jun 2008 02:47 PM  

I blogged about a session I did at OpenForce '07 last year that showed powershell running as a console inside DotNetNuke.  I subsequently started an project on Codeplex that hosts the code from my session.  You should be able to get what you need from that.  The nice thing about hosting it as a module inside DotNetNuke is that DNN has a strong security model that allows you to lock down access to the powershell module. 

I hope to find some time this summer to get back to that module and update it for PowerShell v2.  I am also planning to change the console to a SilverLight based console since it will allow for a more streamlined UI that is closer to a desktop experience.

Joe Brinkman
--------------------------------------------------------
ASP.Net MVP
INETA Speaker
VP Core Technology, DotNetNuke Corp
You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • ShellTools, LLC • Microsoft Windows Server 2008 footer
footer