The Surly Admin

Father, husband, IT Pro, cancer survivor

Flying out to SpiceWorld 2013

Well, it’s 5am and I’m flying out to Austin, Texas for SpiceWorld in just a few hours.  Can’t seem to make myself relax and get some much-needed shut-eye so why not write something here?!

So tomorrow is the big day for Rob and I’s PowerShell introduction session and I’m really pleased with how the presentation came out.  It’s going to be interactive as we build a tiny script with the audience.  There are only about 9 slides and 3 of them are introductory and 1 is an “Any Questions?” slide.  The rest is just to get us to the script writing stage.  I don’t know about you, but any presentation that drones on with a ton of slides, especially when the speaker is essentially just reading off the slide, is usually not a good presentation!  I think Rob and I have managed to avoid that with this one.  The session itself is only 45 minutes and if you’ve done anything with PowerShell you know that’s not nearly enough time to even really get you started so we’re focusing on giving you the tools to write your own scripts using the three base commands:  Get-Command, Get-Help and Get-Member.  I’ve written before about all three before here in my Getting Started series.

I’ve written a few scripts recently that I’m pretty proud of that I wanted to mention:

Get-DiskInfo – Really PowerShellisk type script for getting disk information from your servers and workstations.  Accepts all kinds of pipeline input and outputs objects, both a default set and more extensive information if you use Get-Member.

Export-PrinterInfo – This is a script I’ve had for quite a while that I wrote for someone on Spiceworks but ended up using at work too.  Finally decided to publish it on Spiceworks.  It’s a pretty comprehensive disk information script that saves everything to an Excel spreadsheet.

Send-PasswordExpirationNotifications – Just released this script.  It’s an update of a successful vbScript I wrote a few years back that will send users an email when their password is getting ready to expire.  It uses an old-fashioned INI file for configuration but really allows you a lot of flexibility.  Depending on how much effort you put into it you can really customize your outgoing notification so one usage of the script can be totally different looking from another.  All without touching a bit of code!  It also fully supports fine-grained password policies for those of your who use those.

With the experience of using an INI file I gained from the Send-PasswordNotifications script I also have a new version of the Employee Directory ready.  This script has some complex configuration requirements that parameters can handle, but they’re not necessarily user-friendly.  I really struggled with the decision on whether to use named parameters–which would be much more in keeping with PowerShell best practices–or going with an external configuration file.  I decided to stick with best practices, but in the real world of testing and changing the script I’ve found the parameters to be unwieldy.  Therefore the changeover to a configuration file.  Haven’t published it just yet because I want to test it in the real world first and I had one technical issue that I managed to code around but I’m not convinced it’s the best way of going about things.  If you’d like to take a look at the problem and help me out, please feel free to take a look and let me know your thoughts!  The thread can be located here.

OK, just about time to get ready for my flight!  Wish me luck and I look forward to meeting you at SpiceWorld and I hope you come to the PowerShell breakout session, even if you’re a pro!

Advertisements

October 28, 2013 - Posted by | General |

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: