New book – Learning PowerCLI – Second Edition

Learning PowerCLI - Second Edition CoverToday, my new book Learning PowerCLI – Second Edition was published by Packt. Learning PowerCLI, Second Edition will learn you to leverage the power of PowerCLI to automate your VMware vSphere environment with ease.

Starting with an introduction to the basics of PowerCLI, the book will teach you how to manage your vSphere and vCloud infrastructure from the command line. To help you manage a vSphere host overall, you will learn how to manage vSphere ESXi hosts, and deploy and upgrade ESXi hosts using Image Builder and Auto Deploy.

The upcoming chapters will not only teach you how to create datastores and datastore clusters, but you’ll also work with profile-driven and policy-based storage to manage your storage. To create a disaster recovery solution and retrieve information from vRealize Operations, you will learn how to use Site Recovery Manager and vRealize Operations respectively.

Towards the end, you’ll see how to use the REST APIs from PowerShell to manage NSX and vRealize Automation and create patch baselines, scan hosts against the baselines for missing patches, and remediate hosts. By the end of the book, you will be capable of using the best tool to automate the management and configuration of VMware vSphere.

Compared to the first edition, Learning PowerCLI – Second Edition is updated to vSphere 6.5 and PowerCLI 6.5. Learning PowerCLI – Second Edition contains five new chapters about vSphere Update Manager, vCloud Director and vCloud Air, Site Recovery Manager, vRealize Operations Manager, and using REST API to Manage NSX and vRealize Automation. Read more of this post

Running PowerShell in a Docker container on VMware Photon OS

PowerShell logoA few days ago Microsoft provided PowerShell as an open source project on GitHub, available on Windows, Linux and macOS! The first open source release is PowerShell 6.0 Alpha. In this blog post, I will show you how to run the new PowerShell version in a Docker container on VMware Photon OS. Read more of this post

VMworld 2015 US General sessions

VMworld 2015
During VMworld US 2015 there were three general sessions. The first and second general session were presented by VMware employees and contained the announcements made by VMware during this VMworld.

The third general session, as always, contained three TED talks. This year all of the talks were about the brains.

This blog post gives you embedded links to the first and second general session. Because the video recording of the third general session was not put online, I embedded previous recordings of the speakers, containing the same content as was presented during the VMworld general session. Read more of this post

New VMware fling: Onyx for the Web Client

PowerCLI logoVMware Onyx has been a very popular fling for many years. You can use Onyx to create PowerCLI code by performing actions in the VMware vSphere client. The created PowerCLI code does exactly what you did in the client. The PowerCLI code can easily be adapted to your own needs.

Unfortunately Onyx was not available for the vSphere Web Client. This was a pitty because since vSphere 5.1, new features were not built into the vSphere client. So you could not use Onyx to create PowerCLI for the new vSphere features. I am very happy that VMware now has released a new fling: Onyx for the Web Client. Read more of this post

PowerCLI 5.8 R1 What’s New?

PowerCLI logoDuring VMworld 2014 VMware announced the vCloud Suite 5.8. One of the components of the vCloud Suite is PowerCLI. The new PowerCLI version is 5.8 R1. The PowerCLI 5.8 R1 features announced during VMworld are:

  • Enhanced startup speed
  • Storage Policy cmdlets
  • Query an OVF/OVA for deployment properties
  • OVF/OVA deployment and configuration
  • Added a filter by tag to more cmdlets
  • Enhanced error reporting
  • Added support for RelatedObject to Get-HardDisk
  • Added filtering support to multiple areas
  • Support for latest version of vCloud APIs
  • New-CIVM cmdlet
  • Support for upcoming version of SRM

These are all great improvements for an already great product. I can’t wait until the vCloud Suite is released to use all of these new features.

Don’t forget that PowerCLI is a free tool and you can use it with all of the vCloud Suite licenses.

You can download PowerCLI from www.vmware.com/go/powercli.

For more information about VMworld go to www.vmworld.com.

VMworld 2014 Sunday report

After arriving in San Francisco on Saturday, the first thing that happened on sunday was the 6.1 earthquake, that did shake my bed. Not being used to earthquakes, I didn’t realize it was an earthquake, until a few hours later I read the news.

After a good breakfast with the VMware VMTN Communities moderators, I went to the Hands-On-Labs to do some labs. I did the HOL-SDC-1429 Virtual Volumes Tech Preview. It is a good lab and it showed me that from an administrator point of view Virtual Volumes are not very different from datastores. You can use Storage vMotion to migrate a virtual machine from a datastore to a Virtual Volume and back, just like Storage vMotion between datastores.

Read more of this post

New book – Learning PowerCLI

Learning PowerCLI Book CoverI am verry happy to announce that my first book Learning PowerCLI has been published today by Packt Publishing. This book is written for VMware vSphere administrators who want to automate their
vSphere environment using PowerCLI. Learning PowerCLI is written in a friendly and practical style with a focus on getting you started and automating daily tasks quickly and efficiently. If you manage or administrate a vSphere environment, and want to make that easier and more efficient, then this book is for you! It is assumed that you have at least a basic knowledge of VMware vSphere. If you are not a vSphere administrator, but you are interested in learning more about PowerCLI, then this book will also give you some basic knowledge of vSphere. Read more of this post

Book “Learning PowerCLI” is now available for pre-order

0167EN_mockupcover_normalSome of you may have noticed that I have not been blogging very much lately. This is because I am now writing my first book “Learning PowerCLI”.

This book is aimed at beginning and advanced PowerCLI users and will help you to automate your VMware vSphere environment including hosts, clusters, storage, virtual machines, networks and vCenter Server. The book teaches you how to use old and new VMware vSphere features like Datastore Clusters, the vSphere Distributed Switch, Host Profiles, Image Builder and Autodeploy, Storage I/O Control and much more using PowerCLI.

The expected release date of the “Learning PowerCLI” book is November 2013.

The “Learning PowerCLI” book is available for pre-order at http://www.packtpub.com/learning-powercli/book.

Upgrading your VMFS datastores with PowerCLI

PowerCLI logoWith the release of VMware vSphere 5.0 a new version of the VMFS datastores was released also: VMFS-5. This new VMFS-5 version has a lot of advantages over the old VMFS-3 version (see for information about the new features Cormac Hogan’s post vSphere 5.0 Storage Features Part 1 – VMFS-5). You can upgrade your VMFS-3 datastores to VMFS-5 while VM’s on the datastores keep running. In this post I will show you the vSphere PowerCLI Upgrade-VmfsDatastore function that will do the upgrade for you. Read more of this post

PowerCLI Get-VICommand function error repaired

PowerCLI logoOn my PC (Windows 8 Pro, Windows PowerShell 3 and VMware vSphere PowerCLI 5.1 Release 2) there is a very annoying problem with the Get-VICommand function. If I use this function without specifying the name of a cmdlet to search for, then I get an “Object reference not set to an instance of an object” error message:

PowerCLI C:\users\robert> Get-VICommand
get-command : Object reference not set to an instance of an object.
At C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1:68 char:3
+   get-command -pssnapin VMware.* -Name $Name
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-Command], NullReferenceException
    + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.PowerShell.Commands.GetCommandCommand

Listing 1. Get-VICommand error message with PowerShell 3.
Read more of this post