VMware library

2017-06-25_203353The entire vSphere community (myself included) seems to be in a flutter over the release of the long awaited Host Resources Deep Dive by Frank Denneman and Niels Hagoort. For me this recently resulted in a tweet-thread to see who had bought the most copies (I lost). The upside to this whole thing is I came across Mr. Ariel Sanchez Mora’s (you should follow him ) VMware book list. I love book reviews, so with Ariel’s permission I’m stealing his idea! In fairness you should really go check out his page first, but make sure to come back! Without further ado, here’s the best of my VMware library.

 

Certification

Like many people, this is where I started. I’d heard horror stories about about the VCP, so after taking Install, Configure, Manage I bought my first book, coincidentally (or not) written by the instructor of my class. I immediately followed it up by adding the second piece to my library.

The Official VCP5 Certification Guide (VMware press) by Bill Ferguson

VCP5 VMware Certified Professional on vSphere 5 Study Guide: Exam VCP-510

(Sybex) by Brian Atkinson

I think that in terms of the earlier books, I’d give the edge to the Sybex version. It covers the same fundamentals as the official guide, but goes much deeper.

Just last year while at 2016 I was wandering around the expo floor at VMworld 2016, bumming from failing my VCP6 (it was expected, but disappointing nonetheless), and I walked straight into a book signing for the new VCP6-DCV cert guide. It was destiny or something like that

VCP6-DCV Official Cert Guide (Exam #2V0-621) (VMware Press) by John Davis, Steve Baca, Owen Thomas

Here’s the thing with certification guides; the majority of the material doesn’t change from version to version. DRS is DRS is DRS (not really, but the fundamentals are all there). If you’re just getting started, or able to get a hand-me-down version of an earlier version you’ll still be leaps and bounds ahead of folks who haven’t read the books. They can be a good way to get a grasp on the fundamentals if all you’re looking to do is learn. To that end, if you’re goal is to pass the test, you can’t go wrong with picking up an official certification guide. I know the VCP6-DCV guide provided an invaluable refresher for me.

For more on the VCP-DCV, please check out my study resources.

Hands On

Learning PowerCLI (Packt publishing) by Robert van den Nieuwendijk

I didn’t realize until just right now that there was a second edition of this book released in February of this year! Regardless, this book is a great way to get started with PowerCLI, however it’s more of a recipe cookbook than a tutorial. If you need a getting started with PowerShell book, look no further than:

Learn Windows PowerShell in a Month of Lunches by Donald Jones and Jeffrey Hicks.

This is the guide to get started with PowerShell. Honestly I think the authors should give me commission for how many people I’ve told to go buy this book. It’s not a vSphere book, but if you want to be effective with PowerCLI, this book will help you on your way. It breaks the concept up into small manageable chunks that you can swallow on your daily lunch break.

DevOps for VMware Administrators (VMware press) Trevor Roberts, Josh Atwell, Egle Sigler, Yvovan Doorn

“DevOps” to me is like “the cloud”. It means different things to different people. In this case the book focuses solely on the tools that can be used to help implement the framework that is DevOps. Nonetheless, it’s a great primer into a number of the most popular tools that are implemented to support a DevOps philosophy. If you’re struggling with automation and/or tool selection for your DevOps framework, there are far worse places to start.

Mastery

Mastering VMware vSphere series

The gold standard for learning the basics of vSphere. This title could just as easily appear under the certification section, as it appears on almost every study list. A word of warning, this is not the book to learn about the latest features in a release. That’s what the official documents are for. You may notice that I linked an old version above, and that’s because the latest version was conspicuously missing nearly all of the new features in vSphere 6. That being said, it’s another standard that should be on all bookshelves.

VMware vSphere Design (Sybex) Forbes Gurthrie and Scott Lowe

Age really doesn’t matter with some things, and while that rarely pertains to IT technologies, good design practices never go out of style. This thought provoking book will help you learn how to design your datacenter to be the most effective it can be. I’d recommend this book to anyone who’s in an infrastructure design role, regardless of whether they were working on vSphere or not.

It Architect: Foundation in the Art of Infrastructure Design: A Practical Guide for It Architects John Yani Arrasjid, Mark Gabryjelski, Chris Mccain

And then on the other hand you have a design book that’s built for a specific purpose and that’s to pass the VCDX. Much of the content is built and delivered specifically for those who are looking to attain this elite certification. This is a good book, but as someone who has no intention of ever going after a VCDX, I expected something a bit less focused on a cert, and a bit more focused on design principles. If unlike me you have VCDX aspirations, you definitely need to go grab a copy.

VMware vSphere 5.1 Clustering Deepdive (Volume 1) Duncan Epping & Frank Denneman

I really don’t care if this was written for a five year old OS or not. If you want to learn about how vSphere makes decisions and how to work with HA/DRS/Storage DRS/Stretched Clusters, this is an essential read. Put on your swimmies because you’re going off the diving board and into the deep end!

I’m just going to go ahead and leave a placeholder here for the aforementioned VMware vSphere 6.5 Host Resources Deep Dive. Having heard them speak before and read their other works, I expect this book to be nothing less than mind blowing.

If you liked this, please check out my other book reviews.

Thanks for visiting!

Champlain Valley VMUG – Summer recap

Better late than never I wanted to provide some information to all of the CVVMUG’ers out there coming out of our successful June meeting.

First off another big thanks to our friend Matt Bradford (aka VMSpot) for his vRealize Operations presentation. Here are another couple of gems from Matt that may interest you further:

vmware-vsphere-6-5-host-resources-deep-dive-proof-copiesThe technical talks seem to be a big hit, so much so that we already have a community presenter lined up for October to talk a bit about DRS. To celebrate, we’ll be giving away a couple copies of the brand new Host Resources Deep Dive book. Mind blowing stuff. For a taste you should check out the recent Datanauts podcast featuring the authors and if you make it to VMworld, their Deep Dive sessions are a must attend.

Speaking of VMworld, as of this writing we are 62 days and counting until the kickoff. Please let us know if you’ll be attending. We’d like to do meetup or a happy hour or something. Also stay tuned, you may be able to find us working and/or presenting at the event. 😉

oct12_vmugSpeaking of conferences, you can find my DellEMC world recaps and thoughts here. And here is a bunch of info about VMware announcements and happenings from the event. Lastly, we talked a little bit about the fracas with VMUG and the newly announced Dell Technologies User Community, you can get another voice on that matter here.

Now that the business end is behind, we are trying to line up a BBQ social event for August, place and time TBD. While you’re penciling stuff in, circle October 12 on your calendar for our next Champlain Valley VMUG. We’re still working on a location, but we’ll have that for you soon!

Last and certainly not least, AJ Mike and I want to thank all of you, members and vendors alike for being involved. This is a community for all of us, and we really value all that you bring.

And don’t think that just because we have one speaker lined up for October doesn’t mean that you can’t also get up there. Mules are awaiting.

What is a VMUG?

vmw_vmug_logoUp here in the Champlain Valley we are getting ready for our summer VMUG meeting. While planning the other day someone asked me “What is a V. M. U. G.?” To which I responded “VMUG (pronounced “v-MUG) is…” and launched into a standard elevator, evangelist pitch. Almost immediately I regretted the canned response and started reflecting on what VMUG means to me. It really didn’t take long to reach a resolution to the question. What VMUG means to me can be summed up in a single word: Opportunity.

As I’m someone who wears everything on his sleeve, I’d like to let you know that I’ve been a VMUG leader for almost a year and have been a member and proponent of it since long before that. However long before I was a leader, VMUG offered opportunities to me that may not otherwise be available in Northern New England.

To start with, one of my first VMUG events was the opportunity to attend the UserCon in Boston. If you’ve never been to a UserCon, I suggest checking one out at your earliest opportunity. You have access to labs, technical presentations, fantastic keynotes, access to vendors and your peers! All for the low low price of Free! It’s essentially a miniature version of the big conferences held in Las Vegas, except they are regional and free.

UserCons are awesome but to me the true lifeblood of VMUG is the local communities. As I mentioned previously, I help run the Champlain Valley VMUG community. We hold local meetings 3-4 times a year where you can come to hear from your peers, vendors and industry leaders talk about what is happening in their industries, applications or local businesses. It’s a chance to network with folks in your area and learn about cutting edge tech. Your local meetings are also free, so there really just isn’t a good excuse for missing out.

IMG_3138
Is it a VMUG? p-VMUG? v-VMUG? I’m so confused…

Speaking of networking, did you know that the VMUG advantage membership now includes NSX!  On top of all the evaluation software you can get a discounted ticket to VMworld. Actually it’s the only discount that you can stack with the other discounts. If you’re going to VMworld, or planning on taking a VMware class/exam you should just buy an advantage pass, it literally pays for itself. Seriously, I know this sounds like a sales pitch, but let’s suppose you’re going to take the vSphere: Install Configure and Manage course, that’s around $4000. A VMUG advantage membership gets you 20% off right out of the gate. It’s a pretty good ROI. I’m just saying…

Earlier I mentioned networking, but in my mind this is one of the greatest opportunities that VMUG can afford. Thanks to my involvement with VMUG I’ve learned a ton, gained a ton of awareness of the IT ecosystem, met CEO’s and frankly been able to advance my career. Getting up on stage and presenting about PowerCLI, a topic I’m very passionate about, has helped me get over my fear of public speaking in addition to paying it forward.

Someone recently came up to me and said (to paraphrase) “thanks for your session on PowerShell. I really took it to heart and have been using it in my day to day since.” In all honesty I really couldn’t ask for more than that. By being involved with VMUG I’ve been able to learn, grow my skills, engage with industry leaders and help others. It may sound like a sales pitch, but really this $hit just sells itself.

As always, I’m happy to hear any feedback you may have. Until then, I hope to see you getting involved June 15, at the Champlain Valley VMUG summer meeting!

DellEMCWorld – Final Thoughts

I have received a lot of positive comments about my updates from the conference, so thank you. I’m a big believer in using critical feedback as a means to improve, if anyone out there has any other feedback for me.

I wanted to jot down a last few thoughts from the week before my brain cells totally recuperate. I’m not sure what I expected going into this first combined Dell EMC world, but I do know that I had a blast and learned a ton.

Just for posterity’s sake, here are my first few updates from the conference

Dell EMC World 2017 – Day 1

Dell EMC World – Day 1, the breakouts

Dell EMC World – Day 2 VMware day!

Strategy

captaincanada_copyServer Platforms

It was obvious from the start that with Dell purchasing the EMC federation they were going to go after hardware and namely the converged and hyper-converged markets. Beyond that I don’t think I really understood where this giant beast was going. After this past week, a few themes stuck out to me. The first is an affirmation that as the traditional hardware market slows down, Dell Technologies are indeed going to go even harder after the various converged plays. You could see a physical manifestation of this on the floor of the solutions expo. “Traditional” servers were tucked in the back, whereas the products from the converged platform division that Captain Canada leads were large and in charge of the middle of the expo floor. Prior to the acquisition VCE already owned the majority of the hyper/converged space. I don’t see how you can slow DellEMC down now that they have the servers to integrate as well.

Security

run_nsxIf 2015 was the year of flash, and 2016 was the year of DevOps, then I think I’d like to go on the record saying that 2017 is the year of Security. I work for a financial firm, so I may have a bias towards this topic, but I felt like there was a much stronger message around security at this event. It makes sense. If Dell wants to own the entire datacenter, which they obviously do, you have to be able to secure the datacenter. With RSA, SecureWorks and VMware’s NSX already in the portfolio, it’s a pretty good start. When you then look to see how security is getting integrated into each of the disparate product lines all the way down to the new 14G servers, it looks to me like Michael Dell and team know that the products need to not just perform but need to be secure in order to win.

Other things

The Internet of things space (IoT) as well as AR/VR seemed to have a sizable presence at the conference. People have been trying to emphasize cool products years, but it seems like this might be the year where mainstream adoption starts. I can’t remember the precise figure now off the top of my head but I believe in one of the general sessions they were projecting let’s call it the “ancillary” space or non-traditional servers to be a $45 billion industry by the year 2020. Just for reference sake the market cap of Dell when it was taken private again was under $25 billion. I don’t necessarily see how this plays into long-term strategy but it was everywhere in the sessions and on the expo floor and it’s very obviously on the mind of Dell executives.

The Golden Geese

img_3061During the opening day’s general session, Michael Dell said to paraphrase “A few years ago we bought Alienware. They were the best at what they were doing, and we let them continue to do it.” The not so subtle message to the community is, we bought these companies not to pillage but to leverage their success and make each other stronger. I was fortunate enough to ask Michael himself later that evening if that indeed was his message, especially as it pertains to VMware. I’m again paraphrasing but his message was. “We didn’t buy these companies to pillage them. We are obviously looking for opportunities to itegrate across Dell Technologies, but these companies are leaders in their respective industries and we’re not going to decimate them.” The answer was much longer (and nuanced) but after listening to Mr. Dell and talking to a number of folks who are way more embedded than I, my fears have finally been (mostly) assuaged. Actually after attending a number of sessions across server/compute/storage/security/networking/operations I truly believe Dell Technologies has an opportunity to build something that is bigger than the sum of their parts.

Networking

As an engineer I’ve always felt that my job at conferences is to go breakout sessions wall-to-wall and learn as much technological stuff as I possibly can. I decided to alter the plan a slight bit for this one. As many have said before me, a large part of attending conferences are the networking opportunities. If you’re inclined and motivated there are countless opportunities to get out and network with folks.  Here are a couple of the events I was fortunate enough to take a part in.

Monday

It was an exciting, if not controversial week, in the Dell EMC communities. On Monday I attended the Converged (formerly VCE) User Group meeting. This is where I was fortunate enough to ask Mr. Michael Dell the aforementioned question about the various brands under the new Dell Technologies umbrella. Now I’m a pretty shy guy, but I have never been to a User Group meeting where I haven’t met someone interesting AND learned something AND had a bunch of fun. If you haven’t yet joined up with one of the Dell Technologies communities then you are definitely missing out.

Tuesday

In my role as a systems engineer I have been fortunate enough to work with multiple VCE products across multiple companies. So I was honored to be afforded a chance to attend a technical advisory board meeting for the converged platforms. It was an eye-opening experience to see how the roadmaps & strategies come together and to offer some frank feedback to the people who actually influence these products. Unfortunately I can’t share details from the meeting but needless to say it was a very cool experience that I hope to repeat again.

Also on Tuesday was the Dell Communities event. As a VMUG leader I was very excited to attend this meeting in order to network with some peers who I’ve only emailed with. It’s always nice when you get to meet someone whom you only know by their email and make a personal connection. After all, that’s really a big part of what VMUG is about. If you’re lucky these events are also very cool opportunities to get facetime with people that you wouldn’t normally be able to sit down with.

18301796_933219129910_8177381727013137216_n
I meant Golf you fools!
And it is Vegas after all, so I was happy to wrap the day by enjoying some of the fine dining and activities that you can only find in sin city. All the while networking with one of our key partners, and meeting some cool people.

The Event itself

This is only my second trip to Dell EMC world, so the sample size is small, but each time I’ve been to the event I’ve been very impressed. From the general sessions, to the breakouts, the registration process, all the way down to how lunch is served so efficiently, it seems to be a really really well run event. I just wish that they would stop using so many disposable water bottles.

One of the fears i have attending a vendor run conference is how deep the marketing and sales pitches will run. I haven’t found Dell EMC world to be any worse than any other presentations that I’ve sat through. Some are worse, some are better in terms of the amount of “pitchiness“. On a whole I found the amount of sales at this event to be quite reasonable given all of the networking and educational opportunities that are provided.

With any luck I’ll be able to see how Dell EMC world has evolved in 2018, but until then I guess I’ll just have to wait to see you all in Vegas this August for VMworld.

Dell EMC World – Day 2 VMware day!

General Session – Realize Transformation

End User transformation

focus seems like it’s going to be on the end user space. How are we going to enable (and secure) our workforce in 2017. It looks like we are going to have some solid insights into where Dell is looking to go in the personal device space.

New product announcement: wireless laptop charging! I’ll take two. Coming June 1stIMG_3039

95% of all breaches start at the endpoint. OOF.

Nike and Dell working together on some really amazing tech. Dell Canvas allows user to have a much more tactile experience when designing. It’s going to be a very niche product, but really really cool.FullSizeRender (1)

Dell is projecting AR/VR to be a $45B business by 2025. It’s pretty obvious they’re going to go after this space. AR/VR is also a big focus on the solution floor. Daqri & Dell are partnering to come up with some interesting solutions in this space and hopefully using their scale to drive cost downward.

IoT and grocery. I know some people who might be interested in this part of the presentation. Grocery and supermarkets have a lot of capabilities with how they store products, but they typically just set it and forget it with their thermostats in the freezer & cold cases. Using IoT to track where your products are allows you to fine-tune thermostat controllers and realize real energy & waste savings. Grocery is just one use case, but the idea translates to other verticals. Dell has created a new Open initiative called EdgeXFoundry to start setting standards for the various IoT functions that happen at the edge.

VMware – Realize What’s PossibleFullSizeRender (3)

My favorite part of the general session. It’s fanboy time. Here comes Pat Gelsinger.

Where are we headed… Technology is magic, or has the ability to create magic. We’ve seen this from mainframes->client/server->cloud and IoT and the edge are the next frontier, but it’s happening now.FullSizeRender (2).jpg

LAUNCH ALERT: VMware Pulse IoT Center. Centralize management/security/operation of the network of IoT. Built on AirWatch/vRops/NSX.

 

Just like yesterday it appears that VMware has finally realized that their public cloud offerings … let’s just say they haven’t gone well. They are skipping to next gen of managing the devices at the edge and looking forward to Mobile Cloud.

Workspace one. make it simple for the consumer, but secure the enterprise. Seems like an overlap in the portfolio. How does ThinApp & AppVolumes play into this? Regardless VMware is taking a stronger focus on EUC this year.

FullSizeRender (4).jpgAnnouncement time: VMware VDI Complete. Client devices from Dell, converged infrastructure, and vsphere. It’s VDI in a box. Super Sweet! Oh and here comes Sakac running on stage hooting. Awesome.

Cross cloud architecture. Finally we are getting somewhere. Don’t do the cloud, enable it! At last we get to see VMware Cloud on AWS! vRA is up next. Please just start giving vRA away! To go faster and compete with the public cloud, we need the tools. It’s a loss leader! FullSizeRender (5)

Announcement: VMware and Pivotal are announcing a collaboration to come up with a developer ready app platform with a focus on cloud native/serverless/micro-services/function.

FullSizeRender (6).jpgPivotal Cloud Foundry works with the most powerful cloud providers enabling Dev and IT to get to market faster, delivering value and time back to the business. It’s taken a couple of years to get there, but it seems like VMware is finally got a good handle on their micro-services & cloud portfolio. Today’s presentations are really exciting to see where we’re going.

It’s a bird, it’s a plane, it’s… Invoke-VMScript

I was at work today and a need came across my desk for a solution that requires SNMP. For some reason which I can’t fathom, SNMP is not installed as a service on the majority of the servers. Who do we turn to in tumultuous times like these? PowerShell and his mighty sidekick PowerCLI!

michael-corleone-pull-me-back-in-just-when-i-thought-i-was-out-they-pull-me-back-inFirst things first I wanted to know the scope of what I was dealing with. When I dove into this problem I had every intention of trying to broaden my horizons and move away from PowerCLI, but it’s so easy to get sucked back into what you know. Besides, I knew I was only targeting a couple of clusters, so it only made sense to go back to PowerCLI, right? Right???

If you ignore the ugly formatting, what I did below was load all of the VM’s I needed to target into an object and then iterate through each of them to make sure they were windows machines and that they were powered on. In hindsight I knew that I was probably going to use invoke-vmscript to get the job done, so I probably should have checked for vmTools status (ExtensionData.Guest.ToolsRunningStatus) while I was at it.  snmp1

So now we’ve got a nice neat little hashtable full of servers that need a little TLC. You’d think that we could immediately get rocking, but without going into details things unexpectedly got a little dodgy at this point. I mentioned earlier that I originally intended to try and break away from PowerCLI just to broaden my horizons. Unfortunately as an Infrastructure person you don’t always have the opportunity to do things the way you’d like, and you have to sacrifice elegance for just getting things done. Luckily as VMware admins when we need to get $hit done, we have a very handy and very powerful tool available to us and that is invoke-vmscript.

b436ea981cd43a8a244370d95fa3f343_super-troopers-better-fix-meow-super-troopers-meme_250-131If you’ve heard me talk, reviewed my scripts or spent any time around me you’d know that I think invoke-vmscript is the cat’s meow. It is without a doubt my favorite cmdlet as it lets you get away with some pretty awesome stuff. At it’s root, invoke-vmscript allows you to run a script via VMtools within the context of the local VM. Now this is different from PSexec or PowerShell remoting; you are actually running the a script within the local OS where VMtools and PowerCLI are just the mechanisms to enable this super hero activity.

Quick sidebar: With great power comes great responsibility. I said above that invoke-vmscript “lets you get away with some pretty awesome stuff.” Many people in this world just deploy VMtools and vCenter with default permissions and credentials. If you are a security person, you need to ensure that your roles and privileges are setup appropriately, of you could have exposure due to what you can accomplish with VMtools.

But I digress. We are here to get things done and at the center of it this whole exercise boils down to a one liner:

<strong>Invoke-VMScript -VM $client.Name -ScriptText "DISM /online /enable-feature /norestart /featurename:SNMP" -ScriptType Powershell

 

If you refer back to the original snip, we stored all of the servers into an array, which is being iterated through. We invoke the script targeting $client.name. The parameter for ScriptText is where we pass in the script that we would like to run on the remote system. In this case we are using the Microsoft DISM tool to add the SNMP feature to our Windows installation. Lastly is the parameter for ScriptType. You have three ScriptType options available to you as of today: Bat for you old school Windows Cats, Bash for the nix kittens and PowerShell for the up and coming cubs.

When you put it all together, here’s the code to get it done:

$serverset=$(get-cluster cluster1|Get-VM) + $(get-cluster cluster2|Get-VM)

$ArrRemediate=@()

foreach ($client in $serverset){

if($client.powerstate -eq "PoweredOn" -and $client.guestid.contains("windows")){

if(!$(get-service -ComputerName $client -Name SNMP -ea silentlycontinue)){
$ArrRemediate+=$client
Invoke-VMScript -VM $client.Name -ScriptText "DISM /online /enable-feature /norestart /featurename:SNMP" -ScriptType Powershell
get-service -ComputerName $client.Name -Name SNMP|Select-Object -Property name, status, starttype |ft

}

}

}

&nbsp;

$ArrRemediate.Count

I hope for today you’ll excuse the formatting and less than efficient code, as the mission was to get things done. We achieved our mission and escaped certain doom due to our friendly neigboorhood hero Invoke-VMScript. I hope to have a deeper expose into our masked super hero soon, but until then if you have any thoughts or would like to contribute to the conversation, please reach out.

Why you need more PowerShell

or: How I stopped worrying and learned to love the CLI

I recently gave a Tech Talk at our spring Champlain Valley VMUG on PowerShell and PowerCLI. The talk definitely was more of an introductory instructional, but one of our attendees expressed that they wanted to hear more about the value that can be delivered back to the organization by scripting with PowerShell. Hopefully I can give you a solid overview of the immense value of PowerShell here today.

Why?

The only constant is change and that holds true for IT infrastructure folks as well. Terms like DevOps, distruptor, and Shadow IT have become firmly established in our lexicon. And with good reason! We are in a world that is moving faster and faster everyday and you often see where it’s not the best product that corners a market, but rather it’s the first/fastest to market that gets a stranglehold. If you come from a classical IT role with silos and legacy processes/policies that slow your Organization down… well is it any wonder that you have disruptors changing the model?!? But what if there was a way that you could help accelerate your business, work collaboratively with the Developers, combat against Shadow IT and be the disruptor yourself? Powershell can be the tool that enables this transformation by delivering Time and Consistency to your organization.

Time

This one is simple. Time is money and by investing a little bit of effort up front  scripting a solution, you will save time moving forward. Here is the no-brainer part of the value prop: Do you want to take on the timely task of building environments by hand? Of course you don’t! You want something that’s fast and easy. There’s a take on the old adage that I’ll paraphrase here “Do it once, ok. Do it twice, shame on me. Do it three times, why haven’t you scripted it yet?”

Let’s suppose for a second that you have to install a widget dozens, hundreds or thousands of times. This activity takes hours. Once you script & automate that install, you turn it into a hands off activity freeing up your engineers to do more of the activities that will drive value instead of just watching the progress bar. Simply by the act of writing that script, you’ve saved your business time/money, and honestly you’ve probably gained a bit of expertise and employee engagement as well. Extrapolate this out to all of the infrastructure elements you need to manage: people, policy, applications, servers, storage, network, security and the list goes on and on. Even if you can only automate part of a process, you’re still going to see dividends.

51oYzgTCiyL._SX427_BO1,204,203,200_[1]A less intuitive reason for starting with PowerShell is that it has a pretty quick learning curve, especially if you come from a windows environment. If you have any programming/scripting background you can likely dive right in. This means that your team can be scripting sooner, and can start ensuring that they are driving the non-value added operations out of your day to day. Many infrastructure folks don’t have a background in development activities and as such scripting can be a bit of a hard sell. PowerShell was meant to build upon and extend the foundation of items like Batch and VBscript, but in a way that is intuitive to learn and become efficient with quickly. One of my go to guides for learning PowerShell is the Learn Windows PowerShell in a Month of Lunches guide. This book is so successful in large part because it demonstrates just how easily accessible PowerShell really is.

2017-03-28 11_47_02-Windows PowerShell ISEI mentioned earlier that you can create collaborative opportunities and combat against Shadow IT. PowerShell is built on top of the .NET framework and has support for RestAPI’s baked in. This means that you can share code, speak the same language and have smoother hand-offs. By using PowerShell you have an opportunity to increase the amount of collaboration between your groups. If you can harness this opportunity you’re likely going suffer from less finger pointing, and be able to cut out some unnecessary meetings.

Consistency

Time and consistency (and money) go hand in hand in IT. Having inconsistent environments results in more frequent issues and longer times to resolution. When you start scripting out your activities you will have a much more predictable environment, outages will decrease in frequency and your time to resolution will also drop. This all yields in greater up-time. More up-time means happier customers and happier engineers. Your business is winning!

tom-brady-goat[1]
One is a goat. The other is the GOAT.
Speaking of winning, do you know why Tom Brady is one of the Greatest Of All Time? It’s not because of his ugg’s or his supermodel wife. It’s because he has put in the work up front to ensure that no matter who he is working with, he will have a predictable and consistent outcome. This is what you should be aiming for with your environment: consistent and predictable.

Having a consistent repeatable infrastructure makes that environment easier to rebuild. If you can kick off a PowerShell script that results in a fresh server in a matter of minutes, why would you spend hours troubleshooting a problem? The saying “treat your servers like cattle, not like pets” became popularized for a reason. Wikipedia states that “The term commodity is specifically used for an economic good or service when the demand for it has no qualitative differentiation across a market.” Your servers SHOULD have no qualitative differences, and are therefore inherently commodities, and replaceable. Diving into PowerShell and PowerCLI can help get you there.

PowerCLI

I’ve mentioned it a number of times but some of you may be going, what is this PowerCLI thing? PowerCLI is VMware’s implementation of PowerCLI modules which allow you to “automate all aspects of vSphere management, including network, storage, VM, guest OS and more.” To put it short, it’s a super efficient and reliable (not to mention fun) way to manage your vSphere environments. It’s also incredibly powerful.  There are over 500 separate commandlets in the modules which make up PowerCLI. By some accounts VMware has approximately 80% of the hypervisor market, which means the majority of the worlds infrastructure run’s on vSphere and can be managed with PowerCLI.

Using PowerCLI just allows you to further expand on the amount of Time and Consistency that you can deliver back into your business. With PowerCLI you can automate/manage the network, hypervisors, storage and all of the elements that encompass your “infrastructure”. You can also take it one step further and thanks to the security models built into vSphere you can let your users do it too! With a little bit of thought and design, you can give your developers the ability to spin up and spin down their own VM’s. No more test/dev headaches for you and your developers are happier! The winning doesn’t stop!

As I said to start my VMUG presentation, I’m not an expert in PowerShell or PowerCLI, but I have used it very effectively in my day to day. It’s also a topic that I’m passionate about, otherwise you’d never catch me voluntarily speaking in front of 100 people! I’ve also managed to write some fairly complex scripts that have helped my Organizations reach goals. I hope this post helps you understand some of the value PowerShell & PowerCLI scripting. If you’d like to keep the conversation going or if you have any questions I’d love to hear from you.

What a week!

What a crazy week it’s been. It all started off with a little swim to help some awesome folks…

And they did it!!!!! So proud of our plungers! #penguinplunge #specialolympicsVT

A post shared by NorthCountry FCU (@northcountryfcu) on

Followed by a climb to one of Vermont’s highest peaks with some friends

001

And *I thought* bookended by one of the greatest football games of all time.

BUT then today, I was honored to find out that I’ve been awarded #vExpert status from VMware.

vmw-logo-vexpert-2017-k

With all the uncertainty in the world these days I thought that I was going to sit down and hammer out some “Deep Thoughts by Jack Handy” type proverbs. But perhaps what we (and I really mean me) need these days is little more appreciation and gratitude.

I’m so happy that I got to help the Special Olympics in some meager way. If you’d like to help as well, please visit https://specialolympicsvermont.org/. Despite getting my derriere kicked climbing up Camel’s Hump, I’m appreciative for the friendship that brought me there and the beauty that we experienced. I am happy for the simple joys in life, like rooting on my favorite team and celebrating being an underdog. I’m thankful for my career and the opportunities it’s brought me. And last but almost certainly not least, I am appreciative for my family who’ve supported and encouraged me through all these endeavors.

I hope that you find the same joy and appreciate in those things that matter most to you.

Be well,
Scott

Another day, another PowerCLI report

Another day another reason to love PowerShell.

 I have to come up with a list of all of my Windows machines, their OS versions and editions. My first thought being nearly 100% virtualized is “WooHoo, thank you PowerCLI”…

Except that they don’t include the edition for each VM… Sad face.

image001

However, one of my favorite elements of the PowerCLI tool is the Invoke-VMScript cmdlet contained within the VMware.VimAutomation.Core module. For more about modules, see my post Getting Started with PowerCLI. This script does exactly what it sounds like; it allows you to run a script in the guest OS. Now there’s obviously a number of pre-requisites to leveraging this tool. The big ones are as such.

  • VMtools must be running within the VM
  • You must have access to vCenter or the host where the machine resides
  • You must have Virtual Machine.Interaction.Console Interaction privilege
  • And of course you must have the necessary privileges within the VM.

There could also be some security concerns, allowing your VMware administrators the ability to run scripts within the virtual Operating System Environment, but this opens a whole other bag of worms that we’ll put aside for another conversation.

Once you’ve comfortable with the pre-req’s and any potential security elements, you can get started.

get-vm vm-vm | `
Invoke-VMScript -ScriptType Powershell -ScriptText "gwmi win32_Operatingsystem" 

So what are we doing here? We get the VM object and pipe it to the Invoke-VMScript commandlet where we are running the Powershell script “gwmi win32_Operatingsystem” within the context of the virtual OSE! What you get back is another PowerShell object containing the ExitCode of the script and the output within the ScriptOutput property.

Now just a quick sidenote. If you write powershell scripts, then inevitably you know about Get-member (aliased to: GM), but that only shows you methods and properties, not the values. If you’re not sure what you’re looking for and you’d like to see all the property elements of the object, you can just use $ObjectName|select -property * to output.

Back to the task at hand, I know I need a count of each OS type. I’d also ideally like that broken down by cluster. It would also be nice to know the machines that weren’t counted, so I can go and investigate them manually. So here we go.

$daCred=$host.ui.PromptForCredential("Please enter DA credentials","Enter credentials in the format of domainname\username","","")
foreach($objCluster in Get-Cluster){
    write-host "~~~Getting Window OS stats for $objCluster~~~"
    $arrOS=@()
    foreach ($objvm in $($objCluster|get-vm)){
        if($objvm.guestid.contains("windows")){
            $status=$objvm.extensiondata.Guest.ToolsStatus
            if ($status -eq "toolsOk" -or $status -eq "toolsOld"){
                $arrOS+=$(Invoke-VMScript -VM $objvm -ScriptType Powershell -ScriptText '$(gwmi win32_operatingsystem).caption' -GuestCredential $daCred -WarningAction SilentlyContinue).ScriptOutput
            }else{
                Write-Host "Investigate VMtools status on $($objvm)   Status = $status" -BackgroundColor Red
            }
        }
    }
    $arrOS|group |select count, name |ft -AutoSize -Wrap
    Write-Host
}

You may say, what’s happening here? Let me tell you

After we enter in credentials that we know will work, we are going to iterate through each cluster and as we do such we are going to create an array of each OS that we find in our journey. As we iterate through each VM in the cluster we’ll check on VMtools status as we go, and if necessary flag the VM’s for check later. Then we are going to run Invoke-VMScript within a variable so that we can only capture the ScriptOutput property that’s returned within our array. Finally we can do a little sorting and counting on the array, output to the screen, and go investigate why we have so many darn red marks dirtying up our screen!

image002

Until next time, be well!

The Phoenix Project

From the moment that I arrived in Vegas for VMworld 2016 I started hearing about this book The Phoenix Project. At first I thought that my ears were playing tricks on me when I heard that it was a DevOps novel. This weird reality sunk in when during the opening day keynote address John Spiegel,  IT manager at Columbia Sportswear spoke about the virtues of this book. (segment begins right around 51min)

Given all the chatter around this book, I ordered it from my seat before Mr. Spiegel had even left the stage. The primary message from Mr. Spiegel and the session in general was “treat IT as a factory, focusing on efficiency’s, optimizations”. This is obviously a very important message, but I’d argue that anyone who works in IT and hasn’t recognized, learned, embodied this message, or at a minimum isn’t working towards it…  well… there’s probably other fundamental messages that should be more relevant to them.

There is an underlying theme to the presentation, Mr. Spiegel’s talk and in this book that resonated very strongly with me and that is is to take an Outside-In approach to IT. Instead of focusing on a technology or a framework as many in IT are prone to do, we need to look at the problems (and successes) that people throughout the Organization experience. Take that newfound knowledge to figure out how we can use technology to positively affect their experiences and therefore positively drive the goals of the business. Once articulated it’s a pretty simple concept to internalize: if you don’t know the business, its positives and its problems then how can you possibly be most effective in helping the Organization move forward?

One particular individual in The Phoenix Project recognizes this reality in a rather dramatic fashion and goes from the stereotypical vision of “IT as the department of ‘no'” to one who actively seeks engagement. He takes the empathetic approach of trying to understand both the pains and successes of his business and how he can use his technological skills to affect change for the positive. There is a realization that by attempting to apply strict dogmatic InfoSec principles he just may slow things down. Once his mindset shifts to an Outside-In approach, he’s able to get a far greater level of cooperation, able to implement more of the principles he cherishes, all the while moving the business and his personal/career objectives forward at a faster pace!51eie0testl-_sx333_bo1204203200_

The inside out approach is just one piece of this fantastic book. The novel format is one that I haven’t seen in IT improvement books before, and it certainly makes for an engaging read. Don’t mistake this book for a deep-dive into any frameworks or technologies. Rather it creatively addresses many of the common challenges which need addressing in order for you to develop a high performing IT organization. If you’re looking for a guide on how to begin implementing a DevOps framework and culture in your organization, then disregard the sub-title as this probably isn’t the best book for you.

If you’ve ever been bogged down in the quagmire of firefighting, been unable to break the cycle of finger pointing, struggled to come up with fresh approaches to  the struggles of working in a large IT org or even if you’re just someone who works with IT, then this book should be a must read for you.

PS: If you’ve found this interesting, perhaps you’d like to check out my thoughts on Implementing ITIL written by the same authors.