Color me astonished!!

I’ve been out of touch for most of this week, having only been able to be connected for an extended period of time today, and from somewhere out in left field I received an extremely surprising email from Mr. John Troyer…

I have been named a 2010 vExpert! Words can not describe how honored I am to receive this designation, I feel truly humbled by the others that have received the award and I can only hope that when I grow up I can be like them.

Thank you again to John Troyer and his team for this privilege!

Andrew

Winner, winner, chicken dinner

I WON!  If you haven’t heard, I won the big prize for the Scripting Games this year.  First place landed me a ticket to TechEd North America! I had a hell of a time getting the time off work, and getting my travel authorized, but it all worked out… Below is my agenda for the conference, feel free to contact me via twitter… with the short lead time I have Nothing scheduled (Feels kind of weird to just be going to a show…)

I should be near anything that says PowerShell in between sessions.

Monday, June 7

9:00 AM – 10:30 AM
KEY01 Tech·Ed North America Keynote Presentation

1:00 PM – 2:15 PM
WSV07-INT New Remote Management Technologies in Windows Server 2008 R2

2:45 PM – 4:00 PM
WSV334 Windows Server 2008 R2: Tips on Automating and Managing the Breadth of Your IT Environment

4:30 PM- 5:45 PM
MGT308 Microsoft System Center Configuration Manager v.Next: Overview

Tuesday, June 8

8:00 AM – 9:15 AM
WCL304 Best Practices Guide to Managing Applications

9:45 AM – 11:15 AM
KEY02 Business Intelligence Conference Keynote Presentation

1:30 PM – 2:45 PM
WCL313 Paradigm Shift: Microsoft Visual Basic Scripting Edition to Windows PowerShell

3:15 PM- 4:30 PM
MGT309 Microsoft System Center Configuration Manager v.Next: Software Distribution

5:00 PM – 6:15 PM
DAT203 Managing Microsoft SQL Server: For the "Reluctant" DBA

6:15 PM
WCL318 Using Windows Preinstallation Environment (PE) 3.0 to Troubleshoot and Fix Problems, and to Capture and Deploy WIM Images

Wednesday, June 9

8:00 AM – 9:15 AM
SIA333-R Useful Hacker Techniques: Which Part of Hackers’ Knowledge Will Help You in Efficient IT Administration? (repeated from 6/8 at 3:15pm)

9:45 AM – 11:00 AM
WSV319 Manage Your Enterprise from a Single Seat: Windows PowerShell Remoting

11:45 AM – 1:00 PM
WSV301 Administrators’ Idol: Windows and Active Directory Best Practices

1:30 PM – 2:45 PM
WSV313 Failover Clustering Deployment Success

3:15 PM – 4:30 PM
DAT407 Windows Server 2008 R2 and Microsoft SQL Server 2008: Failover Clustering Implementations

5:00 PM – 6:15 PM
MGT306 Microsoft System Center Configuration Manager v.Next: Hierarchy Design

Thursday, June 10

8:00 AM – 9:15 AM
SIA334 The Secrets of Effective Technical Talks: How to Explain Tech without Tucking Them In!

9:45 AM -11:00 AM
WCL06-INT Using Windows PowerShell for Enterprise Desktop Automation

1:30 PM – 2:45 PM
WCL314 Windows Sysinternals Primer: Process Explorer, Process Monitor, and More

3:15 PM – 4:30 PM
WSV401 Advanced Automation Using Windows PowerShell 2.0

5:00 PM – 6:15 PM
WCL315 The Case of the Unexplained, 2010: Troubleshooting with Mark Russinovich

6:30 PM – 11:00 PM
TechEd Party

See you all there! I’m the chubby white guy with a beard.

~Glenn

Scripting Games 2010: My Scripts


2010 Scripting Games--I was there!

This is more for my own records.  I know for sure I will be using these as a reference over the next few month.  All my 2010 Scripting Games solutions.

~Glenn

Scripting Games 2010: PostGame Roundup

2010 Scripting Games
I just submitted my last entry into this years games, and I wanted to capture a few things before I go and get busy. 

The Challenges

In years past the challenges where the equivalent of the scripting combine.  They would test ones ability to solve a logic problem in code. This created a developer friendly zone.  Whereby professional coders (aka developers) would inevitably produce a script that used some –xor feature or .net class I knew nothing about.  I would look back on my script feel incredibly inadequate and try harder.  This always lasted at most 5 days… until this year I never made it past 5 days.

This year the dread pirate Ed Wilson flipped the script. All of a sudden the event resembled a ticket at work.  As I read them I instantly knew how to do x or y, and would jump straight to the extra credit section.  This my friends is where it got interesting.  Every event this year could be solved by a PowerShell newbie, but to hit all the design criteria that would take some skill.

It was this combination that kept me in the games. Looking back it felt more like leveling in a MMO than work.  It wasn’t enough to solve the problem I wanted my stars.

PoshCode

There were a slew of issues with Poshcode V2 during the first couple days of the games.  They were fixed promptly, and the site has preformed admirably ever since.  This is the second year I’ve used PoshCode V2, and would just like to say…

JOEL… SHIP IT ALREADY…. ITS GOOD ENOUGH!!!!!1111

Seriously though, it is a massive upgrade, I’m excited to see what the poshcode.org upgrade may bring!

The Ratings

Judging criteria was put out here.  The short version is as follows.  If the script looks like it works you get two stars.  Every star beyond that is based on meeting the extra design criteria.  Now that is an incredibly open guideline…. and I am completely okay with it.

The same judges judge all the scripts so one liberal judge will give us all 5 stars.  The next judge might not like our approach and only give it three, but that stingy judge will be stingy to all the entries.  (I have some great scripts that got some whacked rankings.  Tell me how this only get’s three stars?)

That being said I would like to propose one change for next year.  We need feedback, why only four stars… did I miss something? Do you not like the formatting?  Did I go off the deep end for no reason and overcomplicated it?  All of these would be valid reasons to deduct points, but the deduction looses it’s real purpose if we can’t pass on the lesson it contains.

I’ll give you an example.  one of my close competitors this year kept creating the help by hand.  After day two or three I left a comment that said

hey great script, but you’re use of a here-string already locks you to V2.  Might as well go whole hog… check out help about_Comment_Based_Help

His very next script included comment based help.. heck he even gave me a shout out for the tip!  Awesome, this is what these games are about!

Except, that script didn’t rate too well… as of event 5 he was back to his old VBScript ways.  Somehow he associated that change with the bad rating… maybe it was part of it, he’s had all 5’s since.  Either way for on brief moment he was on track…

PowerShell Best practices

Which leads me to my final peeve about these games, and something we should fix for next year.  A script that is CLEARLY VBScript written in PowerShell should not get higher than a 3.  This isn’t about prizes or winning either.  These games are a learning event.  If we aren’t teaching best practices along the way what good are we doing anyone? You know simple stuff like don’t use the Scripting.FileSystemObject com object anymore…  I know this is a slippery slope, and I was truly blown away by the overall quality of the submissions. Nevertheless I think it’s a conversation worth having.

Motivation for the Games

As of this post I’m in first place… Looks like I might win this dang thing(what ever that means)!  Still way to early to call. Either way I didn’t participate this year for any monetary prize… I did it for the vanity of it all. I wanted to know where I stacked up.  I never thought I’d win anything… first place came out of left field.  All in all I got exactly what I wanted out of the games.  I do wish the judges had participated, they need only recuse themselves from the event they judge.  I would have liked to compete against a couple MVP’s.

New Tricks

These games forced me to step my game up.  I used EVERY trick I know, and I learned a few knew ones along the way.  Three specific tricks I will not soon forget.

Splatting:

I finally know what spatting is and why it’s a big deal.  Splatting helped me streamline half of my scripts removing 20-30 logic tree’s, by simply creating the parameter set’s upfront. I know we’ve all heard the definition before, but let me show you in code why it matters!

Before Spatting

After Splatting

As you can see splatting allows you to offload all the logic that isn’t related to the task at hand to the the script/function initialization.  This cleans up your working area, and results in cleaner code!

Windows Forms:

Last week I created my very first windows form GUI ever, and I did it by hand.  Not because I’m hardcore, but because once I got started it was REALLY easy.  Like .net itself windows forms have full reflection, meaning it’s all self descriptive from within PowerShell.

Obviously using a tool like PrimalForms will save a ton of time, but don’t feel like you need a third party tool.  This stuff is easier than you’d think!

WPF/WPK:

This was the gut shot that hurt my brain!  WPF was a lot to bit off in one chunk.  After two weeks with it I feel like I still barel y know what I’m doing, but once I do… WPK will make it easy.  WPK’s strength, and weakness come from it’s meta-programming roots.

If you don’t already know, James wrote a script that wrote WPK.  It’s all machine generated code.

The good part, it is 100% complete it can do anything possible in WPF.

The bad part, there is NO abstraction layer between you and WPF.

There are some really cool helper functions that make it easy to use PowerShell code directly.  But if you want to make a listbox you’re going have to look at a c# example. I originally planned on doing event 10 with boots, and I wish I had time… I want to compare the two head to head, but I ran short and wanted to get my final submission in.

Final Thoughts

100% worth the time, These few weeks have sharpened my skill significantly.  To the point where I’ve actually caught up at work.  At this pace I’ll be ahead of schedule next week.  I think it was just the hard break the games carried… forced me out of my rut.

Take a look at my work let me know what you think. I have very thick skin and prefer the truth over candy coated fairy tales.

If you spent this year on the side line… save the excuses.  These games, like learning PowerShell will advance you professionally; ergo they’re good for work; ergo quit you’re bitchin and get to it!  Unless you were at EMC world ;P

In closing I want to personally thank the sponsors and judges who made the games possible this year:

Thank you, Tech·Ed 2010 North America
Thank you, PoshCode.org
Thank you, Microsoft TechNet
Thank you, SAPIEN Technologies
Thank you, Quest Software
Thank you, /n software
Thank you, Software FX
Thank you, 101FreeTechBooks.com
Thank you, ShellTools
Thank you, Idera
Thank you Judges

I had a blast a learned a ton, Good job all, See ya next year!

~Glenn

@extraparams

Cheesy Christmas Tree Script V2

BSonPosh made me smile this morning with this fun little script http://bsonposh.com/archives/1076… One issue… I like a BIG tree, so I refactored Brandon’s code, Enjoy.

‘Tis the season,

~Glenn

How To: NetBackup Live Update Server (NBLU)

I’ve spent the past month updating/validating our NetBackup architecture. I’ll admit I’m more of a Backup Exec fan, but NetBackup does have some cool features. My only real complaint with NetBackup is the documentation. I’ve never seen a 700 page PDF say so little. One such topic is the installation and configuration of the NetBackup Live update server. Nowhere in the 20 admin guides I reviewed did it spell out “How”. After a brief conversation with Symantec support the veil of poor documentation was lifted.  

You “can” run live update off a CIFS share, but I wouldn’t. It will only sort of work with some windows clients. I’ve spelled out the five steps to configuring an http based live update server on a windows machine. If you hit the Symantec forums you’ll find many confused posts but nothing approaching an answer. Hence this post, I could have gotten fancy and scripted it all out (and I wanted to), but I simply don’t have that kind of time these days. If the NBLU server has been kicking your arse as it did mine… enjoy.

  1. First things first install IIS.
    1. Win2k3/IIS6:
      1. Add/Remove Programs -> Add/Remove Windows Components -> Application Server -> Internet Information Services (IIS) -> World Wide Web Service
      2. check “World Wide Web Service”
      3. OK -> OK -> OK -> Next -> finish
    2. Win2K8/IIS7:
      1. Server Manager -> Roles -> Add Roles
      2. Check Web Server (IIS)
      3. Next
      4. Acknowledge the addition of ISS Management features
      5. Next -> Next -> Install
  2. Create/Populate the live update directory
    1. In the web root create a folder called “liveupdate”
      mkdir c:Inetpubwwwrootliveupdate
    2. Extract the contents of all five zip files into the live update folder. Pay close attention to now overwrite the Segments directory as this needs to be merged.
      NBLU_6.5.4.WINx64_XXXXXXX.zip
      NBLU_6.5.4.WINx86_XXXXXXX.zip
      NBLU_6.5.4.UNIX_1of3_XXXXXXX.zip
      NBLU_6.5.4.UNIX_1of3_XXXXXXX.zip
      NBLU_6.5.4.UNIX_1of3_XXXXXXX.zip
  3. Configure directory browsing
    1. Win2k3/IIS6:
      1. Open IIS Manager
      2. Expand Web Sites -> right click on Default Web Site -> liveupdate-> select properties
      3. Check Directory browsing on the Virtual Directory tab.
      4. Click Ok
    2. Win2K8/IIS7:
      1. Open IIS Manager
      2. Expand Sites -> Default Web Site -> liveupdate
      3. Double click on directory browsing.
      4. Click enable on the right side action panel.
  4. Update MIME information
    1. Win2k3/IIS6:
      1. Open IIS Manager
      2. Right click on <computer name> (Local Computer) -> select properties
      3. Click MIME Types
      4. Click New
      5. Extension: “.flg”
        MIME Type: “Application/octet-stream”
      6. Click Ok-> OK
      7. Right click on <computer name> (Local Computer) -> All Tasks -> Save Configuration to DISK
      8. Right click on <computer name> (Local Computer) -> All Tasks -> Restart IIS
    2. Win2K8/IIS7:
      1. Open IIS Manager
      2. Expand Sites -> Default Web Site
      3. Double click on MIME Types
      4. Click Add on the right side action panel.
      5. File name extension: “.flg”
        MIME Type: “Application/octet-stream”
      6. Ok
      7. Right click Default Web site -> Manage Web Site -> Restart
  5. Test your new NetBackup Live update server
    1. Browse to http:/<hostname>/liveupdate, you should see the contents of the liveupdate folder
    2. Browse to http:/<hostname>/liveupdate/minitri.flg you should be prompted with an open/save file dialog

If 5.1 and 5.2 work as expected then you’re done!

VMware: VCP4

So there I was in-between sessions just after lunch at VMworld when someone on twitter mentioned a VCP button.  Being a big fan of badge bling I showed the post to Andrew, and asked some guys around us If any of them knew anything about it.  One had seen the button, but didn’t know where you got one or why.  This is where my Monday got a little sidetracked.  At first we headed down to the materials pickup where I caught John Troyer stealing buttons!  But they directed us to the customer service desk.

Andrew and I proceeded to the customer services desk to inquire, and were quickly informed that we needed to be VCP4.  Honestly, that should have been the end of it, but for whatever reason we decided to walk over and look for ourselves.  Next thing I know I’ve slapped down my AMEX and I’m sitting behind a person vue terminal!  Why is this significant?

I’ve never touched vSphere, no beta, no RC access… Nothing.. Heck I didn’t even review the configuration maximums before hand!  I took it totally off the cuff no prep at all, and  passed!  I have my VCP on VI 3, and I’ve kept up with vSphere via our wonderful bloggers.  In a month or so I should be the proud owner of a VCP 4 certification.  At this point I need throw a huge thank you over to John Troyer, because while I’ve never touched these features I have listened to extensive interviews/discussions covering every aspect or vSphere.  In many ways the VMware Communities Roundtable Podcast was my “what’s new what’s changed” course.  In addition  to that overview our community in particular Duncan. Scott, Boche, etc provided me with the real life reference implementations.

What I don’t have is the hands on experience, I lack the practical knowledge that comes from performing a real implementation (A.K.A. the part that matters).  So there you have it, everyone complained about the need for the class, and VMware listened.  My question to you is… should I be able pass that test.  Knowing the whole background would YOU accept my updated credentials?  Something to think about next time we start complaining about the need for a class.  Personally, I never would have upgraded if it weren’t for the grace period, so I for one am grateful, but is this what we really want?

Perhaps we can agree that I’m just that good..? I would say that I benefited from the world class engineers I studied by proxy.  Personally I believe all of the above to be true.  Perhaps we could agree that the VCP isn’t that big of a deal, that It’s not a VCDX…I passed the “I know what these do in theory” test. Not the “I know what these do in practice” test. we would then agree that we would test for those skills further up the stack. 

As a Microsoft Professional I’m very familiar with that type of system, but is that what we want? In theory it sounds like a better system, but there is no end once you start down that road.  Microsoft recently had to enact a master certification to find the real masters.  Think about that for a second… why do you need a test to prove ‘this guy really really knows what he’s doing’ shouldn’t the engineer certification handle that?   I don’t know the answer I just wanted to ask the question?

~Glenn

Dearth: an inadequate supply; scarcity; lack.

I suppose that’s how you could describe the amount of posting that we’ve been doing around here the last couple of weeks. You’ll have to forgive us…work’s been crazy, to put it mildly…but things should get much more calm very soon.

Since today’s a “lazy Sunday”, I decided to go back and update the perl script that changes vSwitch security policies to use a better, more intelligent, method to update the spec for the switch(es). This shortened the script by about 20 lines and simplified the code significantly.

Hopefully soon I’ll be posting some information about doing kickstarts, to include setting up a PXE server using CentOS/RHEL, kickstarting using NFS, and kickstarting using a custom ESX iso. I’m also working on how to configure a host (networking, storage, ntp, users, vMotion, add to vCenter etc.) using rCLI/SDK scripts.

fae4f31b51a73055ce198baacb3dcb63ssssss