The Surly Admin

Father, husband, IT Pro, cancer survivor

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

Getting Directory Information Fast

By now, you may have noticed I’m always on the lookout for better performing code.  This has turned out to be a good habit now that I’m working at athena health, as the pure scale of things is so much larger than places I’ve been at in the past.  One piece I’ve never been able to speed up, though, is iterating through folders and files.   Nicolas1847, a PowerShell scripter on Spiceworks, has come up with an ingenious method to get simple directory information using Robocopy (of all things), and a colleague at athena health likes to shell out to CMD.exe and use the old DIR command.  But are they faster?  And if so, which one?

Continue reading

August 4, 2014 Posted by | Powershell - Performance | , , , | Leave a comment

Quick Script: Date Ranges

Ever need to get an array of all the days between two dates?  This script will calculate the date range and load up an array with date/time objects for every date in between the entered times:

To use it, simply call the function

  • Get-DateRange
  • Get-DateRange -Start 7/24/14 -End 8/1/14
  • Get-DateRange -End 7/20/14

And just to pretty it up as a Function and with comment-based help:

July 25, 2014 Posted by | PowerShell | | 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

Exporting User Information

Need to export user information to a CSV?  Perhaps as part of your termination user process?  Incredibly easy with PowerShell, let’s see how to do it.

Continue reading

July 14, 2014 Posted by | Powershell - Getting Started | , , , , | Leave a comment

Extending the Active Directory Schema

Bit of a departure from my normal PowerShell-centric posts, I want to talk about extending the Active Directory schema.  There’s some really great information on the Internet for doing this, but there are some things to consider and none of that information seems to be in one place, and I wanted to bring it together here.

Continue reading

July 7, 2014 Posted by | Technical | , , , | Leave a comment

Getting Last Logon Information With PowerShell

Recently I had to write a report that got the last logon date for all of our users and I really ran into the LastLogonDate problem.  What problem is that, you might ask?  Well, it’s been documented a lot but the root of the problem is when a user logs into a domain account, their login time is recorded into the lastLogon field in Active Directory on the domain controller they authenticated against.  This field is stored as FileTime, which is the date and time as a 64-bit value in little-endian order representing the number of 100-nanosecond intervals elapsed since January 1, 1601 (UTC).  And just to make it a little bit more fun Active Directory does not replicate it.  So if someone logs in in India, and you query your Active Directory Domain Controller here in Massachusetts you will NOT get the updated information.  So now what?

Continue reading

June 30, 2014 Posted by | PowerShell | , , | 5 Comments

Follow

Get every new post delivered to your Inbox.

Join 234 other followers