Home > Blogs > VMware PowerCLI Blog


Using PowerCLI to Configure Hosts

We’re continuing the video series on learning PowerCLI tips and tricks. Previously, we’ve focused on an introduction, creating reports, and handling the VM lifecycle. We will now be focusing on the host configuration process.

This is one of those processes that admins may not do on an everyday basis, but is a huge time saver once automated. However, the individual commands can be run at any time and not just during the configuration process. Using the New-VirtualSwitch cmdlet as an example, it can be reused on multiple hosts to not just provide a time savings during creation but also provide consistency as the commands are ran on each host. Then, once through the individual steps, the video also takes it a step further and finishes up with a way to tie everything in to a script for an automated workflow.

This video shows how to perform the following tasks easily:

  • Adding a Host to vCenter
  • Putting a Host in Maintenance Mode
  • Assigning a license key to a Host
  • Configuring a Host’s NTP server
  • Creating a Virtual Switch on a Host
  • Creating a Port Group on a Host
  • Enabling vMotion on a Host’s Port Group
  • Creating both VMFS and NFS based datastores on a Host
  • Activating a Host
  • Tying all these actions together into a single script

The entire process takes less than 5 minutes, and the script completes in less than 1 minute!

Watch the Video

Other videos available in the series are available below. If you haven’t seen them yet, I highly recommend them. They are all quick, easy to learn and easy to reproduce in your own environment.

This entry was posted in General, Learning and tagged on by .
Kyle Ruddy

About Kyle Ruddy

Kyle Ruddy is a Senior Technical Marketing Architect working for VMware R&D in the Cloud Platform Business Unit. Kyle currently focuses on vSphere and VMware Cloud on AWS automation and the associated automation frameworks including all things API, CLI, and SDK. Kyle is also a Microsoft MVP and long-term vExpert whom can be found blogging on VMware blogs, http://blogs.vmware.com/vSphere and http://blogs.vmware.com/PowerCLI, and his personal blog, https://www.kmruddy.com. His Twitter: @kmruddy

3 thoughts on “Using PowerCLI to Configure Hosts

  1. Vinith

    Nice one Kyle!.

    Reply
  2. vikrant

    Great ,The individual commands can be run at any time and not just during the configuration process. This is amazing .Using the New-VirtualSwitch cmdlet , it can be reused on multiple hosts to not just provide a time savings during creation but also provide consistency as the commands are ran on each host. This is a huge time saver.This video shows how to perform the tasks easily. The way you explained each and everything in this video is really great . It is really helpful. I have done by the help of this video . The entire process takes less than 5 minutes its really quite amazing. Thanks for sharing.

    Reply
  3. Pingback: Using PowerCLI to Configure Hosts – VMpro.at

Leave a Reply

Your email address will not be published. Required fields are marked *

*