Home > Blogs > VMware PowerCLI Blog > Monthly Archives: August 2018

Monthly Archives: August 2018

Introducing Code Capture

I am extremely excited to announce a new feature that’s been added to the vSphere HTML5 Web Client Fling. This new feature is called Code Capture. While the name might not sound familiar, hopefully you’re already acquainted with its predecessor – Onyx, which is currently the most requested feature on the PowerCLI Feature Requests site!

PowerCLI Feature Requests Site - Most Popular

Code Capture gives you the ability to take actions you’ve completed in the vSphere Client and outputs usable code. Once you have the vSphere HTML5 Web Client Fling installed, it’s just as simple as hitting the red ‘record’ button on the top menu, performing your activities, then hitting the red ‘stop’ button. At this point, you’ll be taken to the Code Capture section where you can browse your code and even copy or download the code as well!

Before jumping to download the fling, we should discuss what a VMware Fling really is. Flings are projects that are built by our engineers and made available for general consumption. These flings are distributed under the Technical Preview License and, therefore, are recommended to not be run on production environments. This also means there is no ability to open a VMware support request. However, you can open a bug against the fling itself using the ‘Bugs‘ tab. Also, I would like to point out the ‘Comments‘ tab where you can submit feedback. We would greatly appreciate any and all feedback you have!

Now, let’s checkout Code Capture!

Code Capture in Action

Code Capture In Action

Now let’s take a more in-depth look.

Code Capture Output

In the example above, we can see that we are shutting down a system by the name of ‘app01’. Once we click on the ‘stop’ button, it shows us the PowerCLI.NET code. This is important because, at first glance, the output may not be quite as you expect.

For example, you may have expected to see a command like Shutdown-VMGuest -Name app01 Instead, we saw low-level PowerCLI calls. Walking through the code, it created a VirtualMachine object, which referenced the app01 VM by MoRef, followed by the usage of a method named ‘ShutdownGuest’ that is called directly against the VM object. More information about this specific method: ShutdownGuest()

Code Output:

It’s worth noting, at this point in time, all of the returned code is going to be in this manner. There are on-going investigations to add the translation from this code into high-level PowerCLI cmdlets. If this type of conversion is important to you, please add a comment to the following PowerCLI Feature Request: Onyx support for HTML5 and REST APIs

Using the Output

If I were to power on the app01 VM, I could then use the code in a PowerShell session (where I’m already connected to the vCenter Server) to shutdown the app01 system. To make this easier, Code Capture includes a ‘Copy’ button which easily copies the entirety of the code to our clipboard. We can now paste this into our PowerShell session to accomplish the task!

Example:
Code Capture Copy Paste Output

Another option to extract the code from our browser is with the ‘Download’ button. Clicking ‘Download’ will, depending on your browser configuration, save a file named ‘power-cli-script.ps1’ to your Downloads folder. We can then call that file just like any script from our PowerShell session to accomplish the action.

Example:
Code Capture Using Downloaded Script

Summary

The next generation of Onyx is here and it’s called Code Capture, which is only available in the vSphere HTML5 Web Client Fling! Using the start and stop button on the main menu bar, Code Capture allows you to take your actions in the vSphere Client and output them to PowerCLI code. The code output can also easily be copied and/or downloaded from your browser session using the dedicated buttons in the Code Capture area.

Get started by heading over to the vSphere HTML5 Web Client Fling page and downloading the latest version today!

New Release: PowerCLI 10.2.0

It’s new release day! Even though we’re counting down the days to VMworld, we still have a fresh version for you with PowerCLI 10.2.0!

Speaking of counting, this marks the 4th release of PowerCLI this year. I remember when getting 2 updates in a single year was a major event, much less four! A big shout-out to the PowerCLI engineering team for all the work that’s been done to make this process faster and easier. If you’d like to know more details, VMworld session DEV3504BU will take an in-depth look at the PowerCLI development process. It’s a session I’m super excited for!

On to the updates!

PowerCLI 10.2.0 Updates

PowerCLI 10.2.0 comes with the following updates:

  • Support for NSX-T 2.2
  • Deprecation of the PCloud module, so look for this module to be removed in the future
  • Update to Get-VIEvent to resolve the issue when receiving: Error in deserializing body of reply message for operation ‘RetrieveProperties’

For more information on changes made in VMware PowerCLI 10.2.0, including improvements, security enhancements, and deprecated features, see the VMware PowerCLI Change Log. For more information on specific product features, see the VMware PowerCLI 10.2.0 User’s Guide. For more information on specific cmdlets, see the VMware PowerCLI 10.2.0 Cmdlet Reference.

Remember, updating your PowerCLI modules is now as easy as ‘Update-Module VMware.PowerCLI’.

Update-Module VMware.PowerCLI

PowerCLI at VMworld US 2018

VMworld 2018 Banner

It’s August and that means VMworld is right around the corner! Last year, we had an unprecedented amount of PowerCLI and automation-based sessions and that trend has continued this year! There are more sessions, a re-vamped PowerCLI Hands-On-Lab, not one but two expert-led PowerCLI Hands-On Lab time slots, a Hackathon training session, and there are more vBrownBag & VMware {code} Power sessions than I can count! If you haven’t already registered, the time is quickly ticking away!

Make sure to add the following sessions to your schedule and catch up with the PowerCLI team and the amazing PowerCLI community members!

Sessions

Session: DEV3504BU – Development at VMware: A Look at How PowerCLI Has Evolved Over the Years
Date: Monday, Aug 27, 4:00 p.m. – 5:00 p.m.
Speakers: Kamen Nikolov & Kyle Ruddy
Kamen and Kyle will give attendees a behind the scenes look into the PowerCLI development process and the many ways PowerCLI has evolved over the last 10+ years.

Session: VIN2661BU – Start Automating All The Things with PowerCLI
Date: Tuesday, Aug 28, 2:00 p.m. – 3:00 p.m.
Speakers: Seth Crosby & Kyle Ruddy
Seth and Kyle will help attendees get more comfortable with using automation tools like PowerShell and PowerCLI. This session will feature an introductory overview, followed by several examples which attendees can start using in their environments immediately!

Session: VIN1709BU – Mac and Linux Users, Don’t Despair: PowerCLI Is There!
Date: Tuesday, Aug 28, 3:30 p.m. – 4:30 p.m.
Speakers: Luc Dekens & Alan Renouf
Luc and Alan will discuss how PowerShell and PowerCLI have gone multi-platform, what impact that has on your environment and your existing code, plus some keys to success.

Session: HCI2522BU – Getting Started with vSAN Automation
Date: Tuesday, Aug 28, 5:00 p.m. – 6:00 p.m.
Speakers: Alan Renouf & William Lam
Alan and William show attendess how to get started automating all the aspects of vSAN with tools such as PowerCLI and the vSAN management SDKs.

Session: VIN1992BU – A Deep(er) Dive with PowerCLI 10
Date: Wednesday, Aug 29, 8:00 a.m. – 9:00 a.m.
Speakers: Luc Dekens & Kyle Ruddy
Luc and Kyle will take a look at the more advanced use-cases when using PowerCLI to automate actions in your environment. From proper object handling to diagnosing speed issues to debugging and more, this session is going to be a deep dive into the “what’s possible” with PowerCLI.

Session: NET1528BU – PowerNSX: Bringing the Power of PowerCLI to VMware NSX Data Center
Date: Wednesday, Aug 29, 8:30 a.m. – 9:30 a.m.
Speakers: Nicholas Bradford & Anthony Burke
Nick and Anthony will show attendees what PowerNSX is and how to use it to help automate anything from ad hoc queries to complete NSX data center logical topologies.

Session: HCI2061BU – Forget Click, Click, Click: Manage vSAN at Scale with PowerCLI
Date: Wednesday, Aug 29, 11:00 a.m. – 12:00 p.m.
Speakers: Jase McCarty & Kyle Ruddy
Jase and Kyle will take an in-depth look at the ways vSAN can be managed with PowerCLI to easily achieve consistency and repeatability at scale.

Session: DEV2828BU – Automating IT Ops with Dispatch Serverless Framework
Date: Wednesday, Aug 29, 11:30 a.m. – 12:30 p.m.
Speakers: Alan Renouf & Berndt Jung
Alan and Berndt show off the power of serverless with Dispatch. Attendees will see how to setup and configure Dispatch, plus how to control event triggers with familiar tools, like PowerCLI, and existing scripts.

Session: NET1642BU – NSX-PowerOps: Day2 Ops, NSX Health, Security, and Automated Documentation
Date: Wednesday, Aug 29, 11:30 a.m. – 12:30 p.m.
Speakers: Hammad Alam & Puneet Chawla
Hammad and Puneet will discuss a community-built tool, NSX-PowerOps, which uses tools like PowerCLI and PowerNSX to create documentation of your environment.

Session: VIN3327BU – Documenting Your Virtual Infrastructure with PowerShell and PowerCLI
Date: Wednesday, Aug 29, 2:00 p.m. – 3:00 p.m.
Speakers: Tim Carman & Matthew Allford
Tim and Matthew take the burden of documentation and applies it to an open-sourced project which helps to document environments using nothing but PowerCLI.

VMware {code} Power Sessions

Session: CODE5560U – Closer look at vSphere programming and CLI interfaces
Date: Tuesday, Aug 28, 12:30 p.m. – 1:00 p.m.
Speaker: Vikas Shitole
Vikas will show off the wide variety of APIs, CLIs, and SDKs available for use with vSphere and how to get started with each one.

Session: CODE5547U – Deep dive into the Horizon View APIs & PowerShell module
Date: Tuesday, Aug 28, 1:00 p.m. – 1:30 p.m.
Speaker: Wouter Kursten
Wouter shows off some of the fantastic new cmdlets that have been created and added to the Horizon View Helper module which can be used to enable PowerCLI based automation of Horizon View.

Session: CODE5549U – A better way to see PowerCLI data
Date: Tuesday, Aug 28, 1:30 p.m. – 2:00 p.m.
Speaker: Jake Blecha
Jake will show how to wrangle all the object data PowerCLI can return to get access to what you’re looking for in the format you want.

Session: CODE5540U – PowerCLI Lint
Date: Tuesday, Aug 28, 2:15 p.m. – 2:30 p.m.
Speaker: Justin Sider
Justin will apply the concept of Linting and unity testing to PowerCLI code and introduce some tools to help make the process easier so you can write better and re-usable code.

Session: CODE5622U – It’s Magic! Automating VMware Cloud on AWS
Date: TBD
Speaker: Ryan Kelly
Ryan discusses how to start interacting with the VMware Cloud on AWS APIs with PowerCLI to automate your scalable, highly resilient, infrastructure in the cloud.

vBrownBag Sessions

Session: VMTN5513U – vDeploy – PowerCLI only method to fully deploy a VM
Date: Monday, Aug 27, 1:00 p.m. – 1:15 p.m.
Speaker: Russell Hamker
Russell will walk you through vDeploy, covering what it is, how to use it, and what it supports so you can automate the deployment of a Windows VM to any environment.

Session: VMTN5522U – Automating Troubleshooting with vSphere Operations Manager
Date: Monday, Aug 27, 1:45 p.m. – 2:00 p.m.
Speaker: Thom Greene
Thom will show how to leverage the vRealize Operations PowerCLI module to automate your troubleshooting workflows.

Session: VMTN5535U – Strategies to starting with PowerCLI
Date: Monday, Aug 27, 5:00 p.m. – 5:15 p.m.
Speaker: Seth Crosby
Seth will take you through a handful of valuable strategies for helping you overcome what is holding you back from managing your VMware infrastructure like a pro, with PowerCLI.

Session: VMTN5605U – Getting Started with GitHub for PowerCLI Users
Date: Tuesday, Aug 28, 5:15 p.m. – 5:30 p.m.
Speaker: Justin Sider
Justin will walk through a few different typical scenarios that system administrator experience and how GitHub can solve those issues. From public to private to internal repositories, attendees will gain an understanding how what each are, how to use the, and even some tips on securing them.

Session: VMTN5597U – Powershell, it’s not just for Windows anymore
Date: Wednesday, Aug 29, 10:45 a.m. – 11:00 a.m.
Speaker: Chris Nakagaki
Chris will demonstrate how to easily get up and running with PowerShell Core and PowerCLI on a Mac or Linux system, and where it could possibly go from here.

Session: VMTN5614U – Gentle Shutdown of a 2-node Starwind HCI Cluster using PowerCLI
Date: Thursday, Aug 30, 1:30 p.m. – 1:45 p.m.
Speaker: Matt Langguth
Matt will walk you through an issue with StarWind HCI clusters and how PowerCLI can come to the rescue and overcome the issue.

Meet the Experts

Session: Automate Your VMware Cloud on AWS Environment with Paul Gifford
Date: MTE5097U – Sunday, Aug 26, 3:15 p.m. – 4:00 p.m.
Come meet with Paul to discuss the automation of VMware Cloud on AWS with tools like PowerCLI.

Session: vSphere Automation and VMware Cloud on AWS with William Lam
Date: MTE5013U – Tuesday, Aug 28, 1:15 p.m. – 2:00 p.m.
Come meet with William to discuss vSphere and VMware Cloud on AWS based automation.

Session: PowerCLI with Kyle Ruddy
Date 1: MTE5063U – Wednesday, Aug 29, 3:15 p.m. – 4:00 p.m.
Date 2: MTE5007U – Thursday, Aug 30, 10:45 a.m. – 11:30 a.m.
Come meet with Kyle to discuss any thoughts, ideas, issues, or anything that comes to mind regarding PowerCLI.

Hands on Labs

Lab: SPL-1911-05-SDC_U – VMware vSphere Automation – PowerCLI
Date: Anytime the HOL area is open and available
Get hands-on with VMware PowerCLI. Gain familiarity with the tool, and then dive deeper into the functionality available with real world examples. Both new and experienced users are sure to learn something new about automating their environments.

Session: ELW-1911-05-SDC_U – Expert-Led Workshop – VMware vSphere Automation – PowerCLI
Date 1: Monday, Aug 27, 2:30 p.m. – 4:00 p.m.
Date 2: Tuesday, Aug 28, 12:30 p.m. – 2:00 p.m.
Speaker: Howard Shoobe
Howard will show attendees how to get hands-on with VMware PowerCLI. You will gain familiarity with the tool, and then dive deeper into the functionality available with real world examples.

Hackathon

And last, but certainly not least, the VMware {code} Hackathon! If you’ve never been or haven’t heard of it, this is a fantastic event to get involved with other community members to do some coding! There’s no requirement to know how to code whatsoever. In fact, there are some trainings running before the Hackathon to help you get orientated.

Session: CODEHACK – VMware {code} Hackathon
Date: Monday, Aug 27, 6:30 p.m. – 11:30 p.m.
Join VMware {code} for the third annual hackathon!

Session: HACK6013U – PowerShell Primer: Prepping for Hackathon Success!
Date: Monday, Aug 27, 6:30 p.m. – 7:30 p.m.
Speaker: Kyle Ruddy
Kyle will cover a number of scenarios to help attendees get up to speed so they can use PowerShell to succeed in their Hackathon quest.

Summary

If you’re looking for PowerCLI content, VMworld is the place to be this year! With 10 sessions, over 10 community sessions, multiple meet the experts, and several hands-on activities, there’s something for everyone regardless of skill level. Make sure you’re registered for VMworld and get these sessions added to your schedule today!