![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Execute a powershell script from a webpage Hello, I wonder if it is possible to execute a powershell script and show the result in a the page from a IIS website (6.0 on a W2003 R2 Ent SP2). Thanks for your help. -- P.J.A. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Execute a powershell script from a webpage BZP wrote: Quote: > I wonder if it is possible to execute a powershell script and show the > result in a the page from a IIS website (6.0 on a W2003 R2 Ent SP2). http://powershelltoys.com/ http://www.codeplex.com/Poshboard Also, we talk about this subject on Episode 34, and in Episode 36, we interview a guy from /n software, the guys who created PowersShellASP. http://powerscripting.wordpress.com/?s=powershellasp -- Author, Tech Prosaic blog (http://halr9000.com) Webmaster, Psi (http://psi-im.org) Community Director, PowerShellCommunity.org Co-host, PowerScripting Podcast (http://powerscripting.net) |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Execute a powershell script from a webpage Thanks, PowerShellASP is great ! Regards, -- P.J.A. |
My System Specs![]() |
| | #4 (permalink) |
| | RE: Execute a powershell script from a webpage I configured PowerShellASP, does anyone have any idea on how to add the Exchange Snap in to this tool? I haven't found anything online and am not a programmer. But this would be a great tool especially for those non IE users that need to see their exchange quota? "BZP" wrote: Quote: > Hello, > > I wonder if it is possible to execute a powershell script and show the > result in a the page from a IIS website (6.0 on a W2003 R2 Ent SP2). > > Thanks for your help. > > -- > P.J.A. > |
My System Specs![]() |
| | #5 (permalink) |
| | RE: Execute a powershell script from a webpage Hello kjhoff123, Quote: > I configured PowerShellASP, does anyone have any idea on how to add > the Exchange Snap in to this tool? I haven't found anything online and > am not a programmer. But this would be a great tool especially for > those non IE users that need to see their exchange quota? > > "BZP" wrote: > Quote: >> Hello, >> >> I wonder if it is possible to execute a powershell script and show >> the result in a the page from a IIS website (6.0 on a W2003 R2 Ent >> SP2). >> >> Thanks for your help. >> >> -- >> P.J.A. use powershellASP. To add the Exchange snappin, do this: <% add-pssnapin *exchange* %> The web page will have to run in an application pool that is configured wtih an account that hads the proper exchange permissions to gather the data that you weant to return to the user. Then, try this: <head> <style> body,td,th { font-family: Arial, Helvetica, sans-serif; font-size: 14px; } h1 { font-size: 26px; color: #0B4982; } #left { float:left; margin:10px; width:180px; 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; } </style> </head> <body> <% add-pssnapin *exchange* %> <% $mailboxname = $request['logon_user'].split("\")[1]%> <% get-mailboxfolderstatistics $mailboxname | ft FolderPath, ItemsInFolder, @{Label="FolderSize(MB)";expression={$_.FolderSize.ToMB()} } -auto %> </body> You will have toi fornat the results to your liking ![]() |
My System Specs![]() |
| | #6 (permalink) |
| | RE: Execute a powershell script from a webpage Hello kjhoff123, Quote: > I configured PowerShellASP, does anyone have any idea on how to add > the Exchange Snap in to this tool? I haven't found anything online and > am not a programmer. But this would be a great tool especially for > those non IE users that need to see their exchange quota? > > "BZP" wrote: > Quote: >> Hello, >> >> I wonder if it is possible to execute a powershell script and show >> the result in a the page from a IIS website (6.0 on a W2003 R2 Ent >> SP2). >> >> Thanks for your help. >> >> -- >> P.J.A. I am just starting to rewrite my ASP poages that use C# and powershell to use powershellASP. To add the Exchange snappin, do this: <% add-pssnapin *exchange* %> The web page will have to run in an application pool that is configured wtih an account that hads the proper exchange permissions to gather the data that you weant to return to the user. Then, try this: <body> <% add-pssnapin *exchange* %> <% $mailboxname = $request['logon_user'].split("\")[1]%> <% get-mailboxfolderstatistics $mailboxname | ft FolderPath, ItemsInFolder, @{Label="FolderSize(MB)";expression={$_.FolderSize.ToMB()} } -auto %> </body> |
My System Specs![]() |
| | #7 (permalink) |
| | RE: Execute a powershell script from a webpage Thanks for everyones help, the Application Pool running in a user that had the rights was the issues I was having. By putting in the Exchange Admin Snap in is the PS1 file works perfectly. Thanks again! "BZP" wrote: Quote: > Hello, > > I wonder if it is possible to execute a powershell script and show the > result in a the page from a IIS website (6.0 on a W2003 R2 Ent SP2). > > Thanks for your help. > > -- > P.J.A. > |
My System Specs![]() |
| | #8 (permalink) |
| | Execute a powershell script from a webpage kjhoff12 can you share more details? I want to do the same EggHeadCafe - .NET Developer Portal of Choice http://www.eggheadcafe.com/default.aspx?ref=ng |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Permissions to execute the script | VB Script | |||
| powershell script to execute simultaneously instead of sequentially | PowerShell | |||
| execute Exchange script from DOS - how to get result? | PowerShell | |||
| Powershell Execute process | PowerShell | |||
| execute powershell script from commmand line | PowerShell | |||