SOLVED
Home

Creating a website to display Powershell Script Output

%3CLINGO-SUB%20id%3D%22lingo-sub-67883%22%20slang%3D%22en-US%22%3ECreating%20a%20website%20to%20display%20Powershell%20Script%20Output%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-67883%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20quick%20query%2C%20that%26nbsp%3BI'm%26nbsp%3Bhoping%20someone%20might%20be%20able%20to%20help%20me%20with.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20run%20a%20number%20of%20powershell%20scripts%20weekly%20(Inactive%20accounts%2C%26nbsp%3BDA%20memebers%2C%20etc)%26nbsp%3Band%20the%20output%20of%20each%20script%26nbsp%3Bis%20emailed%20to%26nbsp%3Bmy%20IT%20colleagues%20in%20either%20EXCEL%20or%20html%20format.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20to%20try%20and%20create%20a%20website%2C%20where%20the%20output%20of%20all%20these%20scripts%20are%20displayed%20on%26nbsp%3Bone%20or%20more%26nbsp%3Bpages.%20Where%20should%20I%20start%20with%20this%3F%20and%20how%20can%20I%20integrate%20powershell%20into%20HTML%3F%20Should%20i%20be%20looking%20at%20ASP.NET%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3EBrendan%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-67883%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EHTML%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Escripts%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-68340%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20a%20website%20to%20display%20Powershell%20Script%20Output%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-68340%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20Peter%2C%20I'll%20give%20that%20a%20go%20and%20see%20how%20I%20get%20on!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBrendan%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-68140%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20a%20website%20to%20display%20Powershell%20Script%20Output%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-68140%22%20slang%3D%22en-US%22%3EA%20quick%20and%20easy%20solution%20(depending%20on%20your%20security%20and%20other%20requirements)%20might%20be%20to%20run%20up%20an%20IIS%20web%20service%20and%20turn%20on%20directory%20browsing%2C%20then%20use%20convertto-html%20%7C%20out-file%20to%20make%20up%20some%20html%20files%20for%20each%20report%20with%20a%20date%20stamp.%20You%20can%20then%20browse%20to%20the%20webservice%20and%20see%20a%20listing%20of%20all%20the%20outputs.%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20required%20you%20can%20have%20a%20separate%20script%20the%20cleans%20it%20up%20each%20week%20or%20month.%3C%2FLINGO-BODY%3E
Highlighted
Brendan Leddy
New Contributor

Hi all,

 

I have a quick query, that I'm hoping someone might be able to help me with.

 

I run a number of powershell scripts weekly (Inactive accounts, DA memebers, etc) and the output of each script is emailed to my IT colleagues in either EXCEL or html format.

 

I want to try and create a website, where the output of all these scripts are displayed on one or more pages. Where should I start with this? and how can I integrate powershell into HTML? Should i be looking at ASP.NET?

 

Thanks

Brendan

2 Replies
Solution
A quick and easy solution (depending on your security and other requirements) might be to run up an IIS web service and turn on directory browsing, then use convertto-html | out-file to make up some html files for each report with a date stamp. You can then browse to the webservice and see a listing of all the outputs.

If required you can have a separate script the cleans it up each week or month.

Thanks Peter, I'll give that a go and see how I get on!

 

Brendan