Home > Blogs > VMware {code} > Tag Archives: PowerCLI

Tag Archives: PowerCLI

VMware Code Developer Center Microsite – VMware Cloud on AWS

VMware Code has a terrific set of Developer Center microsites already available for vRealize Automation, NSX, Workspace ONE, and Apteligent. Each of these Developer Centers give easy access to documentation, developer and automation tools, code samples, and more. As of today, we are happy to announce the brand-new microsite dedicated to VMware Cloud on AWS!

VMware Code Developer Center Microsite for VMware Cloud on AWS

The VMware Code Developer Center microsite for VMware Cloud on AWS gives direct access to those resources developers and automation specialists desire most! There’s an overview featuring what’s available through the VMware Cloud on AWS service as well as some videos that dive right into the available APIs and tooling available. This is followed up by a more detailed overview of the available core capabilities. Then, the key use cases are outlined along with the ability to find out more information about each of them and what kind of development efforts are estimated.

The Developer Resources section has a ton of great information available. This section gives direct links to the SDKs and CLIs that support VMware Cloud on AWS. There is also a detailed list of documentation and blog posts to help better understand each aspect of the service as well as how to quickly and easily get started using each of those SDKs and CLIs. Lastly, this section features code that’s been contributed by both VMware and the community to the VMware Code Sample Exchange in a variety of formats. From PowerCLI to Python, CloudFormation to Terraform, there’s some great resources already available and we more than welcome additional contributions!

The last section is dedicated to Community! Community involvement is an important aspect of the automation and developer resources and this section includes links to get involved directly. Joining VMware Code allows for access to an active Slack group with over 5,000 members, receive regular newsletters with the latest VMware information, and access to the developer forums!

Check out the VMware Code Developer Center microsite for VMware Cloud on AWS today!
Let us know in the comments what you think and/or if there’s anything missing that you may be looking for.

Featured Member: Cody De Arkland

As we like to bring up, there are a lot of people doing great work in and around the VMware {code} program. Back in March we introduced the “featured member” segment here on the VMware {code} blog: brief interviews with some of our key contributors to help everyone get a better sense of the kind of things the VMware {code} program aims to make possible.

Our second interview was done via email and is presented below (with minimal edits for consistency).

As always, we’d love to hear your feedback in the comments below, on Twitter or on Slack. If you’d like to be interviewed yourself or know anyone who might be interesting – please get in touch. Thanks!

Who are you and what brings you to VMware {code}?

Cody De Arkland profile image

Cody De Arkland

My name is Cody De Arkland, and I’m a Senior Systems Engineer with VMware out in Sacramento, California. My focus is on the Core VMware technologies; but my passion is around automation. I’m relatively new to VMware and in my previous role worked pretty heavily with VMware’s various APIs for a lot of automation and reporting work at a major utility company. I also run my own blog about my lab adventures, called The Humble Lab (https://www.thehumblelab.com). Finding the {code} community and seeing how active it is was really exciting to me. It felt like a natural place to visit any time I was going to code something in vRealize Orchestrator, or interact with the APIs. Knowing that most, if not all, of the API documentation was landing here made it really easy to “dig up” as needed. Lately I spend most of my time here browsing the code samples for things to include in my Alexa with VMware project (Codenamed Gideon) or reviewing API documentation.

How long have you been actively coding? What got you started?

I started writing code mostly as scripting in PowerShell probably around 5 or 6 years ago. I stayed pretty active working with PowerShell up until about 3 years ago when I took a role working on private cloud at the utility I mentioned previously. In this role, I had to work in vRealize Orchestrator a ton which heavily leverages JavaScript. I spent a few years working with and learning JavaScript in the vRO context. Eventually I found myself wanting to do more live custom reporting, and wanting to dig a bit deeper into VMware’s software development kits. I knew Python was a pretty active language with a strong community, and that it had a reputation for being easy to get started with. I made myself sit down and learn Python over the course of several months while I was off work with my newborn, during her nap times. This led me down learning more about taking Python code, and feeding into webpages to build various tools. Rest was history!

What languages do you use the most? Why?

I use PowerCLI/PowerNSX pretty much every day for something. With my current project (the Alexa and VMware one) I’m in Python a lot, also working with regular HTML quite a bit. I like PowerCLI and PowerNSX because how fast and programmatic you can be with configuring items. It’s also a great way to track your “changes” to an environment, or even track how to deploy something. Python I love because of the community that surrounds it. There’s a tool for every project in Python, and normally a huge community of people who are willing to help!

So we’re hearing you did a project recently using Amazon Echo. In a few sentences, what was it you were trying to accomplish?

When the Echo first came out, I found out that it was extensible using a number of developer-friendly languages. I had spent a few months while I was off work with my newborn learning Python during naps – and I felt like practical experience automating with the Echo would help me learn Python faster. I always learn better by doing; and diving into a code project like this seemed like it would teach me volumes – which it TOTALLY has. I’m also an avid homelabber, and I had this thought of “How cool would it be to be able to wake up, and say “Alexa, hows my lab running?” and have it respond with current status.

It started off as a simple project; but it’s quickly grown into something a bit bigger with a full UI, configuration options, and proper hosting configurations. It’s pretty exciting. I opted to use VMware’s ClarityUI because of how well documented it was, and how easy it was to get started with. It made my page look a lot cleaner than I typically could’ve done on my own. 

Was this a work project or just for fun (or both)?

I would say both. I wanted to learn to interact more with our SOAP API via Python since it’s a bit more full featured than the REST API is currently, but I also wanted to learn more about consuming the REST APIs. When I worked at the utility, I felt like learning more web development skills would help me answer the needs of the business more, and now that I’m working at VMware I also identify a bit more with what our customers are looking for in our platforms.

On the fun side, who didn’t grow up wanting their computer to interact with them? I thought it would be a fun thing that would grow from being only VMware focused into larger home automation stuff. Plus, I’d learn a ton. I feel like any day you don’t learn something new is a day wasted.

At VMware {code}, our goal is to provide developer with tools and resources to “learn, code and connect”. Were you able to make use of any of these resources? If so, how?

You guys are definitely meeting your goal! The amount of documentation available on “code”-related items on the VMware {code} site is unreal. It’s nice having a central repository for all the developer-centric documentation. The sample exchange encourages sharing back out to the community, and it’s really easy to jump in there and find good samples around the concepts I was working on. I spend a ton of time on the site. Furthermore, the Slack channels are great. There’s a channel for pretty much everything it seems and the community is pretty friendly when you have a question you’re stuck on.

Thanks very much, glad to hear! Now that your project is up and running, what’s next?

Ha! Nothing’s ever done…come on now 😉

I’ve certainly made some progress, but there’s a long way to go on this. One of the things I love most about the VMware {code} community is the community involvement. Since I tweeted out the stuff I was working on, I’ve had a lot of people internally and externally jump in offering to contribute and help out. It started out just being something to interact with vSphere and vRA, with a future view of NSX. Now I’m talking to a ton of different people about additional products that we could tie into APIs against.

Excellent! Thanks so much for taking the time. Finally, how might people best connect with you online?

Twitter is probably best; @CodyDeArkland, along with TheHumbleLab blog

* * *


VMware {code} Briefing: 05/11 Event Follow-Up

We had a fun time at our first-ever VMware {code} Briefing last week. Thanks again to Kyle Ruddy for the presentation (click here to watch the recording) and to Alan Renouf and Jake Robinson for answering questions in real-time.

Here’s a transcript of the Q&A part of the webinar, edited slightly for clarity:

Q: When might we expect to see functionality for Instant Clones worked into PowerCLI?
A: The APIs are not public for Instant Clone as yet, once they are we’re sure it will be a high priority.

Q: Please include cmdlets for vSphere Replication.
A: Thanks for the request! We are waiting for a public API for this feature from the feature team. Please do pass on your need to the vSphere Replication team and we will also remind them (again).

Q: Cmdlets for VDS NIOC shares and such would be useful at some point if it’s not already in there.
A: Thanks for the feature request! And just to be sure you know, you can do this today via Get-View (we know it’s more complicated this way).

Q: Do you have the PSversion value from $psversiontable that is needed for the prereq?
A: Good question! It’s basically any version of PowerShell that supports the nuget cmdlets as shown on the screen right now. Can’t remember how far that goes back but quite a way. Powershell 3 (any build) and on should work. Of course, we recommend using the latest available.

Q: Offline installation process is cumbersome, especially for data center and DMZ machines. One EXE is much easier.
A: You can also just copy the folders straight to the modules folder, no admin rights required unlike the EXE/MSI. You can download the modules zip files from the gallery API as well. Some orgs that use Powershell as a strategic advantage also run their own private gallery, enabling all machines without access to the Internet to use the install and update cmdlets.

Q: Do you always have to use Connect-? to initiate the auto loading of the modules?
A: No, any cmdlet in the PowerCLI module will auto load it. Connect- is just normally the first run.

Q: We need Mr Lam’s xVC-vMotion script made into a cmdlet!
A: Check this out: https://blogs.vmware.com/PowerCLI/2017/01/spotlight-move-vm-cmdlet.html As Jake said, this is already part of Move-VM in the latest PowerCLI version.

Q: How come no one uses the new Show-Command? It clarifies parameters so much easier for demos.
A: Love that cmdlet! http://www.virtu-al.net/2013/05/31/using-show-command-with-powercli/

Q: I can’t upgrade to PSV 5 on my Windows 7 Box, but am able to get it to work on my Win10 box.
A: Powershell 5 is a part of WMF 5. Hit us up on the VMware {code} #PowerCLI Slack channel to share some more detail!

Q: Is Log Insight going to get any cmdlets soon? I saw someone had a GitHub one but is a bit dated and limited.
A: Please ping us on the VMware {code} #PowerCLI Slack channel with what Log Insight tasks you want to automate!

Q: Any plans or timeline to add NSX into PowerCLI?
A: Yes, we’re working hard on it. Stay tuned!

Q: What is a practical use case for the vROPs cmdlets?
A: We have seen customers use the cmdlets for many use cases ranging on custom reporting to actions based on the information in vROPs using PowerCLI to react to issues etc. With the entire Public API being available through the cmdlets it really is down to your imagination/requirements.

Q: What about Onyx for vSphere 6.5?
A: Our hope is to provide support for this on the HTML 5 client in the near future. Onyx is important to us!

Q: Onyx for the HTML5 client?
A: Coming in the future to a Fling site near you.

Q: Any plans on porting the vic-create cmd over to powercli?
A: The long term goal of PowerCLI is to support all VMware products, including VIC! 🙂

Q: Is there going to be an officially supported version of PowerVRA by VMware in the future? https://www.powershellgallery.com/packages/PowervRA/2.0.0
A: We want to support Powershell modules for all of our products. 🙂

We hope that was helpful. If you have further questions regarding this latest PowerCLI release or PowerCLI in general, just head on over to the #PowerCLI channel on Slack. In case you’re not a member yet, go and sign up first (you’ll receive your personal Slack invite right away).

VMware {code} Briefing: What’s New with VMware PowerCLI 6.5.1

VMware PowerCLI 6.5.1 was released on April 20th and it contained some significant improvements and changes! Whether you’re an occasional PowerCLI user or a power user, you’re not going to want to miss this special briefing!

VMware {code} Briefing – What’s New with VMware PowerCLI 6.5.1
Thursday, May 11, 2017
9am Pacific (12pm Eastern)
Via WebEx
Online registration

Kyle Ruddy will be our guide and presenter. Make sure to join the #PowerCLI Slack channel to join the conversation before, during and after. Not a VMware {code} member yet? Join here.

See you there!

Featured Member: Brian Bunke

There are so many great people connecting through the VMware {code} program, it’s hard to keep track. This week, we’re introducing a new feature here on the VMware {code} blog: brief interviews with some of our key contributors to help everyone get a better sense of what’s going on.

Below is the first one. As always, we love to hear your feedback in the comments below, on Twitter or on Slack. If you’d like to be interviewed or know someone we should feature – please get in touch. Thanks!

Who are you, what do you do, and what brings you to VMware {code}?

My name is Brian Bunke, and I’m a Systems Automator for a manufacturing customer in the Seattle area. I joined the VMware {code} community because I interact with VMware products often, and I’m passionate about developing and improving tooling that fellow admins and I consume in our day-to-day lives. Currently, most of my work in the {code} community has revolved around the Vester project.

Briefly, what is Vester?

Vester is a community-driven, open source project written in PowerShell. It uses PowerCLI and Pester to provide a lightweight configuration management solution for VMware administrators. Vester runs tests to ensure your environment matches your config file, and is capable of automatically fixing any problems it finds.

Neat! How can people get involved?

A main goal of maintaining Vester is making tests easy to write and contribute. We hope this interests users in giving a little something back to the project! If you’re interested in learning more, you can review my three-part blog series on how to get started.

You recently shared some code via VMware {code} Sample Exchange. What was that about? And what was your experience?

I wrote a PowerShell function, Get-VMotion, because I found I was reviewing vMotion history often enough that it was worth packaging into a simple command. I wanted to provide it to the community as a way to pay it forward, and the Sample Exchange has some really slick integration with GitHub that made sharing very simple.

Any other ways you’ve made use of this piece of functionality on the VMware {code} website?

The “Requests” area is a cool idea that hasn’t seen much traction yet. If you have an idea for some code that you’re not sure how to write, you can post your request to the community at large. Maybe someone else agrees that it’s a problem worth solving, and has the means to do so!

VMware {code} was launched about a year or so ago. What would you like to see going forward? As we continue to grow and evolve the program, where do you see the biggest opportunities?

I believe there is still a lot of untapped potential in unlocking the developer community on common goals. The Slack team is a great way to self-organize, and I hope {code} can continue to promote those contributions. If community work is encouraged and celebrated, more will be incentivized to participate, and the VMware ecosystem will continue to flourish.

Thanks, Brian! Where can people find you online?

Thanks for the opportunity! I blog at www.brianbunke.com, and you can find me as @brianbunke on Twitter, GitHub, and Slack.

March 16 VMware {code} Town Hall: Your Direct Line to the VMware Product Team Behind the vSphere Automation REST APIs, PowerCLI, ESXCLI and vCLI

Do you wish you could have a direct line back to the product teams at VMware?

Something annoyed you about the product and maybe you never knew where to send your feedback?

Perhaps you just love the product and want to give a “virtual” thanks to the wizards behind the curtains?

Following the vSphere Automation team’s big announcement yesterday, we thought it might be a good idea to give everyone an opportunity to check in with them directly and get your questions answered and feelings heard on this and also the other products worked on by this team.

We’re excited to announce our first-ever VMware {code} town hall! For one full hour next week, the team – including Alan Renouf (@alanrenouf), Kyle Ruddy (@kmruddy) and members of the development teams – will be available to answer your questions and discuss the road ahead:

VMware {code} Town Hall
Thursday, March 16
9-10am Pacific Time
Online on VMware {code} Slack
Channel #vsphere-sdks

How to join:

Hope to see you there. Should be fun!