Using PowershellASP
There is a new toy out in the PowerShell Community - PowerShellASP.
You can find the description on the website, but there has been some question as to how to get it working.
The easiest way I’ve found is to work off the demo provided, where the web.config
file is all set up.
What you need to do for IIS 6, is:
- Create a Virtual Directory with the source being the PowerShellAsp download folder.
- Create an Application
- Update the configuration
- Add the ps1x extension and the executable of “C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll”
- (If you are using the sample files this is done already) Update the web.config file with
<httpHandlers>
<add verb=”*” path=”*.ps1x” type=”PowerShellToys.PowerShellASP.PSHandler, PowerShellToys.PowerShellASP”/>
</httpHandlers>
- And you should be ready to run PowerShellASP pages.
- Technorati Tags: Powershell,powershellasp,asp,iis 6


July 17th, 2008 at 9:28 am
[…] at PowerShell Basics wrote a post about how to write ASP pages using […]
July 29th, 2008 at 1:41 pm
Can we add snapins? so that we can use exchange? i have not being able to find examples
July 29th, 2008 at 7:09 pm
I would assume that you could load any snap-in that is available on the server. If you have the Exchange snap-in (and I have not yet installed Exchange 2007, so I’m not sure how easy it is to install the management tools on other servers/workstations).
I’ll try out loading other snapins that I have available.
August 28th, 2008 at 4:54 am
Mail Queue Monitor
body,td,th { font-family: Arial, Helvetica, sans-serif; font-size: 14px; }
h1 { font-size: 26px; color: #0B4982; }
#left { float:left; margin:1px; width:100px; border:1px solid gainsboro;font-weight:bold}
#left P { border-bottom:1px solid gainsboro;padding:4px; margin-bottom:2px;margin-top:2px; }
#left UL { margin:2px; padding:0px; }
#left LI { list-style: none; margin:4px; }
Mail Queues
Mail queues:
<a href=’?d=’>
Message/s queued on server
Fromaddress
Status
Queue
Subject
Lasterror
SourceIP
Size
September 22nd, 2008 at 11:38 am
So any word on the code to add the exchange snap-in, I have powershellasp running and it is great, but being new I cannot figure out the code to add the Exchange Snap in to the code. I would love to be able to run exchange commnads via this especially for those NON IE users to get quota information….
February 26th, 2009 at 8:27 am
February 26th, 2009 at 8:27 am
“”
June 11th, 2009 at 11:12 am
You can execute the following PowerShell command to add the Exchange snapin.
add-pssnapin *.Exchange*
Note that the system you are executing from needs to already have the Exchange Management Tools installed for this to work.