The Surly Admin

Father, husband, IT Pro, cancer survivor

Making a Consistent Profile

Like a lot of administrators I work on a couple of different PC’s, and keeping my PowerShell profile the same on each machine is a bit of a pain.  I decided it was time to do something about that!  With these changes I can easily add to my profile and have that change happen on every PC I use!

Continue reading


December 8, 2013 Posted by | General | | Leave a comment

Post SpiceWorld High

It’s been a couple of days since I’ve returned from SpiceWorld 2013 and I’m still trying to digest the experience.  First off I must say I have never been to a tech conference where I’ve had quite as much fun as I had here.  The Spiceworks community has always been something different–an amazing collection of people who just want to help each other out–and that community translates almost perfectly to the SpiceWorld experience.  Read on, if you’d like!

Continue reading

November 8, 2013 Posted by | General | | Leave a comment

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!

October 28, 2013 Posted by | General | | Leave a comment

SpiceWorld 2013

Really excited that I’ll be attending Spiceworld 2013 this year.  I’ve been using Spiceworks software since 2009 and been very active in their community most of that time but this is the first time I’ve attended their yearly conference.  I think it will be a great way to meet a lot of the people I’ve been interacting with for years but couldn’t tell you what they look like to save my life!

I’m also excited to be working with another Spicehead, Rob Dunn, on the Introduction to PowerShell 3.0 breakout session.  Rob and I are working hard to present PowerShell to beginners and hopefully cut down some of that initial learning curve that no doubt exists for newbies.  We really wanted to give a hands-on experience to learning PowerShell too, so no endless list of slide’s and lecture.  Our plan is to present 2, 3 maybe 4 slides than just sit in front of a PC and write a script with the whole group.  We’ll have to guide the script a bit as we only have an hour, but the idea is to present 3 different script ideas and let the group decide which script we’ll write.  From there we’ll show you how you can use PowerShell itself to help you write the script–bouncing from the shell to the ISE and back again until we have a rough little script written.

I’ve never done anything like this, and I’m thankful that Rob will be with me.  Rob has been with Spiceworks even longer than I have and written some great scripts.  His expertise is mostly with vbScript, which I think is really nice as he can bring that perspective to the PowerShell experience.  I’ve written quite a lot in vbScript too so it’s nice that we can speak the “short-hand”, without translating back and forth between languages!   It’s also been exciting that we both seem to have the same ideas–so far!–on what and how we want to do this so we can really focus on trying to bring the best and most interesting session we can.  Nothing worse than sitting there and having some guy sit behind a desk and drone on, essentially reading his slide deck to you!  This will NOT be that.  We’re going to be sitting with a PC on the screen writing the script with you.  Explaining why we do things the way we do them, and running into the same problems you would run into while writing a script and solving the problems right there.

So come down to Austin and join us at Spiceworld, find out what’s really happening in the world of the SMB and maybe learn a little PowerShell along the way.

October 14, 2013 Posted by | General, PowerShell | , , | 2 Comments

Pebble and Pushover

Want to send alets to your Smartphone and Pebble directly from Powershell? Read on!

Continue reading

August 5, 2013 Posted by | General, PowerShell | , , | Leave a comment

Pebble and Vacation

You may or may not know that I recently purchased a Pebble, and while everything isn’t perfect with it I have really found myself enjoying it and wanted to write a bit about my experiences with it!  Read on, if you’re interested!

Continue reading

August 2, 2013 Posted by | General, Technical | , | Leave a comment

Merry Christmas!

Hope you holiday is filled with cheer!  For my International readers (all 4 of you) I hope your holiday season, and whatever holiday you celebrate is the best one yet.

And here’s a little script from Joel Bennett that hopefully puts a smile on your face:


December 25, 2012 Posted by | General | , | Leave a comment

Using Spiceworks Forums

Wanted to do a light, non-Powershell post today about the Spiceworks forums.

Continue reading

December 6, 2012 Posted by | General | | Leave a comment

Happy Thanksgiving!

I’d just like to wish you and your family the best Thanksgiving wishes.

Stay safe, stay sane and remember what’s really important to you.

November 22, 2012 Posted by | General | Leave a comment

Busy Weeks

No post today for a couple of reasons.  Last two weeks have been remarkably busy, what with my backup server crashing 2 weeks ago (here) and then one of our ERP’s crashing last week–yes, we have two, don’t ask!–I just haven’t had time to work on my script projects.  It’s also been pretty quiet on the Spiceworks front so nothing really interesting coming across there.

Continue reading

November 5, 2012 Posted by | General, Technical | Leave a comment