Home > Blogs > VMware PowerCLI Blog > Tag Archives: Flings

Tag Archives: Flings

New Release: PowerCLI Preview for VMware NSX-T Fling

A new Fling has been released for PowerCLI! The PowerCLI Preview for NSX-T Fling adds 280 high-level cmdlets which operate alongside the existing NSX-T PowerCLI module.

What do I mean by ‘high-level’ cmdlets? There are generally two forms of cmdlets available through PowerCLI, high-level and low-level. High-level cmdlets abstract the underlying API calls and provide an easy to use and understand cmdlet, like Get-LogicalSwitch. Based on that, you can assume the output will be logical switches. However, every API call does not have a corresponding high-level cmdlet and that’s where the low-level cmdlets come into play. Low-level cmdlets interact directly with the API and therefore have complete coverage of the available API calls. An example of a low-level cmdlet would be Get-View, or in the case of the NSX-T module it would be Get-NsxtService. More information about the low-level cmdlet usage of the NSX-T module is available in the following blog post: Getting Started with the PowerCLI Module for VMware NSX-T

Why is this being released as a fling? This module is still being developed and we need your feedback! What cmdlets are you using the most? What should the output look like? What cmdlets aren’t working the way you think they should? What cmdlets are missing? As well as any other feedback you can come up with! The preference is to leave the feedback on the fling’s comments section. However, if you post it as a comment here, I’ll make sure the right people receive it.

With that said, let’s get started using this new module!

Geting Started

First, we’ll need to head out to the VMware Flings site, browse for the fling and download the zip file. Direct link: PowerCLI Preview for NSX-T Fling

Next, extract the module and place it into one of your $PSModule directories. Better yet, do it with PowerShell:

We can then verify the module was placed in the proper location and is available for us to use:

Unzipping the Fling download

Note: If you don’t see the VMware.VimAutomation.Nsxt module, you probably need to install the latest version of PowerCLI. Walkthroughs on how to do that are available:

Now that we can see the module, I would suggest browsing through all of the 280 cmdlets available in the module. We can do that with the following command:

Browsing through all the available cmdlets in the Fling Module

One last step before starting to use the new cmdlets, we need to authenticate to the NSX-T server. This requires the VMware.VimAutomation.Nsxt module because it makes available the ‘Connect-NsxtServer’ cmdlet. We can authenticate to the NSX-T server with the following command:

Authenticating to the NSX-T Management Server

We are now authenticated and ready to start pulling information from the environment. Following along with the prior blog post, let’s start by pulling information about our cluster. We can do that with the ‘Get-ClusterNodeConfig’ cmdlet.

Example: Get-ClusterNodeConfig

We can clean up the output through the use of the ‘Select-Object’ cmdlet with the following command:

Example: Simplifying output for Get-ClusterNodeConfig

Another item we looked at in the last blog post, Transport Zones. The ‘Get-TransportZone’ cmdlet can be used, however if we want to clean it up a bit we can run the following command:

Example: simplified output for Get-TransportZone

One last example, we’ll get the status of the cluster. This can easily be done with the ‘Get-ClusterStatus’ cmdlet. However, the results are probably not what you expect. The ControlClusterStatus and MgmtClusterStatus each have an additional nested property of ‘Status’ which we’ll need to gain access to for this to really make sense. To do that, we’ll create a custom dynamic property with PowerShell! These custom properties will be made of hashtables used as part of the ‘Select-Object’ cmdlet. Each hashtable will need a ‘Name’ and an ‘Expression’. Here’s an example of this concept with the ‘Get-ClusterStatus’ cmdlet:

Example: Get-ClusterStatus and handling nested property values

Summary

There’s a great new fling available called the PowerCLI Preview for NSX-T Fling. This fling adds an additional 280 high-level cmdlets for VMware NSX-T, like Get-TransportZone, which means that automating NSX-T has never been easier!

As with all of our Flings, please leave feedback on the Comments section! We want to know what you think. What cmdlets are you using the most? What should the output look like? What cmdlets aren’t working the way you think they should? What cmdlets are missing? As well as any other feedback you can come up with!

PowerCLI Core Coming to a Fling Near You!

One of my favorite announcements at VMworld happened to be about PowerCLI, of course! The big announcement was about its future availability on multiple platforms, including Linux and Mac OS X. This functionality has been one of the biggest requests the PowerCLI team has received over the years and it is extremely exciting that it’s finally coming!

The announcement actually happened during Alan Renouf and Luc Dekens’ session INF8092 titled: The Power Hour: Deep Dive, DevOps, and New Features of PowerCLI. The response in the room was amazing. Then, when Alan asked who would be planning on running PowerShell and PowerCLI on Linux and/or Mac OS, the amount of hands that went up was staggering. In fact, it was so staggering that Alan had to take a picture:
INF8092

I would be remiss if I didn’t mention how this was all made possible by our friends at Microsoft. This past August, Microsoft actually open sourced PowerShell which in turn opened the ability for PowerCLI to be run on multiple platforms.

VMware, and PowerCLI in particular, were involved as special guests when Microsoft made the open source announcement. If you haven’t checked out the announcement video, it’s worth a watch. Pay particular attention around the 46-minute mark:

At this point, you’re probably looking for more details. PowerCLI Core, the multi-platform version of PowerCLI, will be released as a VMware Fling. However, it has not been made available as of yet. The PowerCLI Engineering team is, and has been, working extremely hard on preparing the release.

I’ve had a chance to play with an early version, and it’s amazing. They’ve done an excellent job and it really is just that cool. It still puts a smile on my face every time I do this:
PowerShell on OSX

In the meantime, here is a video showcasing the upcoming Fling:

If you want to watch Alan and Luc’s session INF8092 where the announcement was made and check out all the other awesome PowerCLI goodness that was made available at VMworld, the session is viewable today. It’s also worth mentioning that the session was voted into the Top Ten Sessions of the Day, so I would consider it a ‘must see’! Direct Access to the video available here.

Good News! PowerActions 1.5.0 is now available for vSphere 6.0 Web Client

PowerAction

I am happy to announce that the very popular fling ‘PowerActions for vSphere Web Client’ is now available for vSphere 6!

What’s New Continue reading

New VMware Fling: Introducing PowerActions for vSphere Web Client

PowerAction

I am happy to announce a new fling ‘PowerActions for vSphere Web Client’ PowerActions integrates the vSphere Web Client and PowerCLI to provide complex automation solutions from within the standard vSphere management client. In short, we can now run PowerShell/PowerCLI scripts from the Web Client!

How does it work?

PowerActions is a Continue reading