The Surly Admin

Father, husband, IT Pro, cancer survivor

Accommodate or Dictate Your Scripts

I’ve been thinking a lot about this lately.  What, you ask?  How to approach writing a script or advanced function.  Most of the time I’ve always in the accommodate world, where I try to imagine every scenario that might happen and account for that in my script.  But is this the right approach?  Should I instead simply dictate that this is how you use the script?  A lot of people do it (VMware requires Connect-VIServer before you do anything).  Should I start doing the same?

Continue reading

December 14, 2015 Posted by | General | 2 Comments

Opening up my Scripts

I have a confession to make.  I’m really busy at work.  So busy, and challenged, that I haven’t had much time to keep the blog going and certainly not enough time to help support all the scripts I’ve written.  In fact, if you’re subscribed to the Employee Directory post, you’ve seen the back and forth going on there!  I feel really bad that I haven’t been able to get back to the few of you who have reached out to me because you’re running into problems, but the work/life balance is a little skewed right now and the blog and supporting you is what’s had to drop off.

The other problem is I don’t have the infrastructure around to support some of the scripts, the DFS Monitor comes to mind!  No DFS here at work so hard to test!

So what to do?  I want people to enjoy my scripts and I’d like to continue seeing development happen on them.  So time to get these things out on GitHub.  This way if you want to make changes you can fork the code off and do your thing and even put in a pull request–I swear that should be a push request, but that’s just me–and if I like what I see I’ll merge it in with the main code.

You can find me here, and the scripts I’ve published so far:

That’s all I have right now, but if there’s a script you’d really like to see up there just let me know in comments and I’ll get it posted ASAP.  I hope this helps!

 

 

April 14, 2015 Posted by | General, PowerShell | , , | Leave a comment

SpiceWorld Day 2

Another interesting day at SpiceWorld.  Sat through the morning session about IT Policies and I’m not going to lie, got a good nap in during that one.  As necessary as they are it would take an amazing speaker to make it interesting!!  The guys here were good, but not up to that monumental task.

Next session I attended was the JEA from Jeffrey Snover.  Great session talking about “Just Enough Administration” and how this is now possible with the tool sets provided by PowerShell.  As with most security measures it’s only as good as the effort you put into it–which in my experience often means no one does much with it at all.  As it stands it’s a great idea and the functionality is there, but I doubt it will be widely adopted.  The reason is everything is custom, you create your custom tool sets with custom permissions and then override, or “proxy” known PowerShell cmdlet’s with your requirements.  What I mean by that is you can actually modify Restart-Computer with a custom validation set so someone using that toolset could only restart Server1 and Server3, but would be unable to touch Server2.  Cool stuff, but honestly seems impractical at this juncture.  Once some easier interfaces, templates, etc start being available I believe you’ll see this take off.

After that I went to the Windows 2012 Deduplication session.  This was put on by a Veeam employee, but he took great pains to make sure we understood he was doing this as an enthusiast and not a speaker from Veeam.  He was very successful.  Great session and really highlighted the insane compression ratios possible with Windows 2012 in the proper circumstances.  In this case the massive backup files created by Veeam backup software.  Ninety-four percent?  Are you insane?!  Couldn’t wait to take that back to the office.

After that just visited a few vendors, then sat through the raffle.  This was a lot of fun as you had to be in the room when the raffle called your name.  If you weren’t your ticket was put into the shredder to chants of “Shred it!  Shred it!” and the crowd was out for blood.

Kris Bushover also put on his yearly presentation of the best tickets his department received from Spiceworkers.  Most of them were pretty terrified of this particular presentation, but it’s all in good fun and great for a laugh.

After that was a after-party there in the convention center which was essentially a last chance to catch up and visit with everyone, new and old friends alike. Then a few of us met up with the community managers over at Champions, but Vegas rules were in effect so can’t say anything more.  Although I did find out what camel case meant, thanks Justin.
Great time, and the PowerShell session was so much fun to put on I just love doing it.  Not sure if I’ll be able to go back next year as it’s a very expensive trip and I had to foot the entire bill.  I will try.

 

September 29, 2014 Posted by | General | , | Leave a comment

SpiceWorld 2014: Day 1

SpiceWorld 2014 hasn’t officially started, but this year was a little different from last year in that they have set aside the main “gallery”–this is mostly where we ate last year–for some of the vendors.  They now have full convention style booths in there, which was interesting!  CDW actually had a bus which I’m looking forward to walking through.  But as always with SpiceWorld a lot more time was spent catching up with online friends and talking then looking at the goods!  Already have a bag full of swag, which is typical for SpiceWorld.  Did I mention I brought a much bigger piece of luggage than I actually needed because I learned my lesson from last year!

After that Rob and I broke off and did one last practice run of our Introduction to PowerShell presentation.  We ran it on Rob’s Surface, which was mostly OK except we did run into a few problems.  First the Help files didn’t contain all the help information?!  And then when we tried to run Update-Help discovered he was of the WiFi!  We were running late so we just winged it–and we’ve done this enough times that we can pretty much do that in our sleep–and I think it’s going to be pretty good this year.  I added some slides for the last SpiceCorp and the concept was good but the slides needed tweaking and Rob was able to do exactly that and I think they’re really solid.  It’s all around objects and really hammering home what they are.

After that we walked about a mile–ok, it was probably less but to my feet it felt like a mile!–down to Banger’s for a ton more socializing!  Too hot to try out the sausages, but they looked amazing.  Ran into a lot of friends there and was able to catch up, and also ran into several people from Boston SpiceCorp, so great to see the Northeast so well represented!  Also got to meet Jeffrey Snover and that was really fantastic.  Didn’t get to talk to him long but seemed like such a great guy–I’m sure he’s not an ax murderer.  No more than I am!  <Insert evil villain laugh here>

I ran back to the hotel after that and tried to catch the premier of Gotham but at 9pm they showed an hour and a half of news!  And it wasn’t on at 8pm.  The weird thing was they covered Gotham in the news cast and said it would premier today!  Oh well, did tape it at home so it’ll have to wait until I return!

That’s it for today, should be more to write about tomorrow!

September 23, 2014 Posted by | General | | Leave a comment

SpiceWorld 2014

And I’m in Austin!  Looking forward to getting SpiceWorld started.  Our Introduction to PowerShell session is one of the first ones out of the gate, not sure if that’s good or bad!  I’ll take it as good as I can enjoy the rest of the convention after that.  Looking forward to meeting Jeffrey Snover who arrived yesterday (according to his twitter feed).

Excited!  And very hungry!  Have to find something to eat!

September 22, 2014 Posted by | General | | Leave a comment

SpiceWorld 2014 Just Around The Corner

Getting very excited that SpiceWorld 2014 is just around the corner.  Heading out to Austin in a couple of weeks to enjoy the spicy goodness.  Rob Dunn and I are again putting on our Introduction To PowerShell presentation, and I think we’ve made some good tweaks to the presentation to improve on it from last year.  If you’re new to PowerShell and coming to SpiceWorld this year, you HAVE to come check us out.  Unless anything changes we’ll be up in Room 9 on the second floor.

SpiceWorld 2014

Registration

Introduction to PowerShell

Oh, did I mention that Jeffrey Snover will be there?  He’ll be talking about “Just In Time, Just Enough Admin” so should be a fantastic 1, 2 punch of PowerShell–and general best practices–goodness.
It’s been so busy at work, and the PowerShell scripts have been flowing fast and furious.  Unfortunately they’re so specific to the environment here that I haven’t been able to publish anything.  I did finally come across another way to produced WhoIs data, so my WhoIs script is back in business!  One nice thing about the report is I’m using a technique that converts HTML tables into XML and allows you to manipulate them directly.  This is good because there’s a current bug in Set-CellColor script that if two cells in a row have the same data, and you’re trying to color the cell with that data BOTH cells will get the color treatment.   Using XML looks very promising in stamping that out but I just haven’t had time to dig into it yet.

Wish I could show you all the cool things I’ve been able to work on!  I’ll have to write about some of them as I can generalize a lot of it–I think!

September 12, 2014 Posted by | General | Leave a comment

Spicecorp Thursday, July 24th 2014

Should have posted this a couple of weeks ago, but I’ll be at the Boston Spicecorps this evening doing a quick, one hour introduction to PowerShell.  It’s all about taking some of the fear away from using PowerShell.  We’ll be going over objects and the 3 commands you have to know to really get into PowerShell:

  • Get-Command
  • Get-Help
  • Get-Member

There’s about 10-15 minutes of slides to get through, then the rest of the time is all sitting in front of the ISE and writing a script from the inside out.  If you’re not doing anything this evening and you are in the Boston area, swing by and say hello!

Link to Spicecorp Boston

July 24, 2014 Posted by | General | Leave a comment

Personal Update

Most may not realize, but I recently left my old position at SeraCare Life Sciences and moved to athena health (lower case is on purpose).  As sometimes happens in business, SeraCare felt they could do without me and while I didn’t necessarily agree I have to admit my situation has improved quite a bit.  athena health is a cloud based technology company selling EMR–electronic medical records–and claims submission automation.  I think this is a great business model, and judging from their 30% growth over the past 2 years (each year) their clients feel the same way!  athena is quite a bit different from my past positions as it marks my first real return to corporate IT since leaving Sun Life of Canada many years ago–I did have a stint of a 3-month contract working at PC Connection but the commute was just too much–otherwise I’d probably still be there!

It’s interesting how IT changes at scale as the differences to small business are stark.  Petabyte flash-based SAN’s are the standard now, with high-speed Compellant storage being relegated to tier two storage and backups!  I was excited to be getting flash-based drives in a few laptops before.  And I have PowerShell to thank for it!  I was primarily hired because of my script writing talents–though I’m sure 20+ years in the industry didn’t hurt the decision any.  All the hard work in the Spiceworks, PowerGUI and PowerShell.com forums, not to mention this very blog have really paid off.

And with the scale of athena health comes interesting side effect to how you have to approach your PowerShell script writing.  When I run a task against all of the users now, its not a report with 150 lines in it, it’s a report with 4,700!  Suddenly, multi-tasking using PowerShell jobs takes on a whole new meaning, as well as taking a different perspective on your script writing.  Often I’ve just done brute force methods because the datasets were so small it just didn’t matter.  That’s no longer an option!

Another cool thing I’ve been working on is re-writing our fax troubleshooting tool.  Have I mentioned faxing as it relates to athena health yet?  I should, because I’ve never seen, or heard, anything like it.  One of the features of athenaNet is we give you, the client, a toll-free fax number and all of your incoming faxes come to us and we place it in your portal.  Sending something out to a lab?  Just complete the form and we’ll take care of the fax to the lab–both sending and receiving.  It’s actually pretty amazing.  And we do a LOT of a faxing.  No, seriously, it’s stunning.  I don’t know the exact numbers but it’s hundreds of thousands of faxes sent and received every day.  We actually went over 1 million faxes a couple of weeks ago.  The infrastructure for just our faxing environments is larger than most companies entire data centers!  We have 2 “environments”, A and B and three data centers.  Each data center has 8-12 servers PER environment so that’s a whopping 48 to 60 servers–I’ll have to do an exact count at some point–just to support faxing.

So a fax troubleshooting tools is a given.  One of my first projects walking into the door was to fix the one we had, which was written in ASP.  Now, I told the boss right off the bat, “you realize I don’t know ASP, right?!”  He was fine with it and was actually looking to do something in PowerShell first, then putting some kind of web front in on it later so we can roll it out to the account managers.  I’ll be writing about how I accomplished this in a future post, but I mostly just copied Boy Wonder here, so feel free to look through his stuff in the mean time.  With some tweaking this actually ended up working really well.

Anyway, I am still around and I am still writing when I can.  Luckily things are starting to slow down a little bit so I can start thinking about the blog again.  FYI, I’m doing a beginner’s guide to PowerShell for the Boston Spicecorps on July 24th so if you’d like to check it out make sure to sign up for Spiceworks and get yourself registered!

June 18, 2014 Posted by | General, Random Thoughts | 2 Comments

PowerShell Hero

An unexpected honor came across my Twitter feed today!

Continue reading

January 8, 2014 Posted by | General | | 5 Comments

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