The Surly Admin

Father, husband, IT Pro, cancer survivor

New Scripts – Bandwidth Report and Google Charts

Got a couple of new scripts I recently wrote, here’s some quick thoughts on them.

Continue reading

April 2, 2014 Posted by | PowerShell - HTML Reporting | , , , , , | 4 Comments

WhoIS Report

Really fascinating project came through Spiceworks the other day and I wanted to talk about it.   In the DNS forum someone posted that they needed a tool to lookup certain WhoIs information.  The interesting part was they had over 1000 domains so they needed something that could create a report on that kind of scale, so a simple WhoIs website or application wasn’t going to cut it.  But as I looked at it, I began to wonder if this was something I could pull off with PowerShell?  I knew there would be no problem once I had the data, but the trick would be getting the data.  But surely there was a RESTful API out there for WhoIs data, right?  If I could find that then a simple Invoke-RestMethod should retrieve the data necessary and we’re good to go.  Right?

Continue reading

March 7, 2014 Posted by | PowerShell | , , , | 1 Comment

ConvertTo-AdvHTML – New Advanced Function for HTML Reporting

I love using ConvertTo-HTML.  There, I’ve said it.  The vast number of scripts I write are doing some kind of reporting function and the ability to create simple, fast, yet good looking reports with HTML has been a huge plus for PowerShell.  That said though, there’s definitely room for improvement.  ConvertTo-AdvHTML is an advanced function that addresses some of the current limitations with current cmdlet.  But this blog post isn’t going to a long explanation of how to use the new cmdlet, instead I wanted to write a script that actually used it.

Continue reading

February 27, 2014 Posted by | PowerShell - HTML Reporting | , , , , | 14 Comments

New Version: Employee Directory

I keep getting requests “Can I get this field?” or “Can I get that field?” for the Employee Directory script and honestly it wasn’t designed for that.  The header in the table has to be manually changed, and the JavaScript that does the button filtering has to be altered.  Not to mention the reverse engineering that has to occur because I don’t necessarily remember everything I did in the script 6 months ago!  So it was time to sit down with the script and see if there was something I could do about this.  Here’s what I came up with.

Continue reading

May 16, 2013 Posted by | PowerShell | , , | 112 Comments

How to Create HTML Reports

Find yourself creating reports in Powershell and wished they looked a little more presentable than a CSV file?  Send regular reports to your manager and want it to look professional?  Here are some technique’s I’ve developed that produce some pretty sharp reports in HTML using standard Powershell cmdlets (plus one function to pretty up your tables).

Continue reading

January 21, 2013 Posted by | PowerShell - HTML Reporting | , , , | 7 Comments

Simple Server Status

A little while back the Microsoft Scripting Guy, Ed Wilson, blogged about creating a simple web page with server uptime.  It was an interesting use of some of the Powershell capabilities and the output was pretty good, if a little uninspiring–not his fault I might add, more a limitation of the Powershell tools he was trying to use.  I didn’t do anything about the script at the time, but it always intrigued me.  Then the other day a very similar request came across on Spiceworks.  At first I just gave the guy the same link I put above, but now the bug was in my ear and I decided to write something up.

Continue reading

October 11, 2012 Posted by | PowerShell | , , | 6 Comments