Functions, Powershell, server, Server Management Tools

Visualizing Data with Excel and Powershell

Recently I was Reading a write-up on API and transforming data with Python.

I know this is a blog about PowerShell right? However I want to point out that python is a scripting environment and actually more involved to get started so the restraints of that for a beginner is constricting (Pun intended).

PowerShell is on every windows computer since windows XP and PowerShell version 7.0 is now available for install on all Major OS including Mac, Linux and even IoT and its backwards compatible to windows 7.

If you are interested in a python project go here, because it will satisfy your needs and also take hours!

I will however show you how to do it with Html and Excel.

The First way is with an additional module known as “importExcel” (the link to the psgallery details is there)

Truth be told you can also Export to excel as well even though the name doesn’t give that away.

Let’s install it, we will do it in a way that is allowed if you don’t have local admin rights on your PC.

Install-Module -Name importexcel -Scope CurrentUser

Import-module importexcel

Thus your environment is ready for the next commands. 


get-service | where  -property status -eq running |select name,status,starttype |Export-Excel -Path $home\documents\TestExport.xlsx -Show -Title "Running Services" -TableStyle Dark10 -AutoSize 

This is how you can start reporting and looking professional and save the formatting steps.

See the next post to see how we tie performance metric to Excel reporting.


Scripting Technique, server, Uncategorized

Learning when and “Where”.

learning your way around the shell is really important. the “where-Object” is like the GPS of the pipeline and to elaborate on the pipeline a little is a one way train to get you to the solution you need.

here is an example.

where GPS

I set this to select the first one to help trim the image. There are 3 properties to navigate these service entries.

I used the pipeline to give you an example of the “|” pipeline so you can understand the flow of things. the object(s) are declared and sometimes processed before the pipeline. then more things can happen.

Look below for an example:

Where Turn by Turn.jpg

The pipeline is the directions in which you mold your data.  you put that with some select-object & other commands like format-list, ConvertTo-html, Export-csv, & Out-File.

So I can’t wait to see what you have waiting to travel down the pipeline! See you around the city!