Tuesday, April 25, 2017

Adventures in Getting Started With PowerShell


This might be a bit below many of you and if so, feel free to laugh at my newness to PowerShell. I am beginning my journey in becoming “API-enabled” with a focus on VMware products, specifically VMware NSX, and from talking with customers and peers, PowerShell seemed like a great place to start.  I saw on Twitter that we have released a new PowerCLI this week so I figured let’s start with that. 

My home lab has a Windows 2012R2 server that I use for my admin/jumpbox so I started a RDP session, opened a PowerCLI window and started to follow along on the blog.  After failing with the first command, I knew I was in for a great learning experience and started this blog post.

A quick search online and I see I may not really have PowerShell installed or it is woefully out of date.  I’ve downloaded the RTM and installed it per the instructions on this MSDN article.  So after a reboot, let’s try it again. Much better!

Next, I needed to import the VMware PowerCLI module and it asked me to participate in the Customer Experience Improvement Program (CEIP).

I chose to participate as I am just a guy blonking around on a keyboard and not playing with production or customer workloads.  I also followed the instructions to create a shortcut on my desktop that would automatically load the PowerCLI module every time I open the window.  Simple, right?  Like I said, I am getting started so apologize if this comes off as a “Color by Numbers” approach – it’s what I need.

So now that I have PowerCLI installed on my host, where do I go next?  Well, I want PowerNSX so I start at GitHub and read this post.  I follow along and paste the string to install it and it’s obvious from the long, complex string I have a lot of things to learn (Good!)

You can see there is a bit of an issue, probably related to the new installation of PowerCLI, so let’s open an Issue.  Lo and behold, my colleague in the UK has already found this issue and the
PowerNSX team have already provided a new one-liner to fix it.



Armed with the new string, it seems much happier.



Now I have PowerNSX and am ready to be dangerous.  We’ll save the fun stuff for the next post!

Note this was originally posted on CodeNSX.com/blog 



No comments:

Post a Comment