Node JSPowerShellWindows PowerShell

System Information Web App Using Node JS, PUG and PowerShell

It all started with a simple question “How to deliver reports to clients?” simple ASK and solution is further more simple. Yes, using NODE JS and PowerShell we can play with data! Since I can’t share client data and to keep this blog simple let me show a easiest way to retrieve system information as fancy HTML sorry PUG. In my upcoming blogs we will cover retrieving remote machines and bootstrapping  for now it’s only for local host 🙂 ! All PowerShell lovers! Hold On I am not using ConvertTo-HTML or any other custom modules!

Our goal is to attain the below illustrated GIF 🙂

If you are PowerShell addict I bet you might have enjoyed Don Jones ConvertTo-EnhancedHTML – Find a TechNet Wiki Post shared by me! Yes, somewhat similar I tried! Now, let us host as web app using PowerShell, Node JS and PUG (NOTE: We play with PUG!). A sample system information PowerShell scripts is shown below! Yes, you can add functionality as required!


We get output as illustrated below

We all know this and no big deal here! What makes bit excitement is in PUG file! All, we need to loop through JSON and present the data! Here is the logic!

Using each statement in pug we are retrieving the Disk information and likewise Service and Process data. Note here the properties are case sensitive! With no wait! Here is the full code!



Enjoy PowerShell!

Leave a Reply

Your email address will not be published. Required fields are marked *