Thursday, April 27, 2017

Using VMware vSphere Update Manager with PowerCLI


In a vSphere environment, VMware states that vSphere Update Manager (VUM) is the preferred method of upgrading and patching vSphere. Fortunately, for PowerShell users, PowerCLI supports performing the functions of VUM.
Using VUM to upgrade ESXi hosts in a GUI is a relatively straight forward process which is shown on 4sysps here by Jim Jones. Using PowerCLI, I will show you how to update a single ESXi host and an entire cluster. Please note I am using PowerShell v5.1, PowerCLI v6.3 and vSphere v6 in these examples.
Update Manager baselines
VUM uses baselines, which are a group of patches that you can “attach” to a template, virtual machine, ESXi host, cluster, data center, folder, or VApp. After a baseline is attached to one of these entities you can scan to see if it is in compliance, meaning if it is missing any patches that apply to it in the baseline. Below you can see how to retrieve compliance information about a host with the Get-Compliance cmdlet.
$Baseline = Get-Baseline -Name 'Critical Host Patches (Predefined)'
C:\> Get-Compliance -Entity VMHost-1 -Baseline $Baseline
Entity                       Baseline                               Status
------                       --------                               ------
VMHost-1                     Critical Host Patches (Predefined)     Compliant

In this article I will be using the “Critical Host Patches” baseline exclusively. This is a built-in baseline that will include any critical patch for your ESXi hosts.
Read more on 4Sysops.com

No comments:

Post a Comment

Recompiling Chocolatey packages

Chocolatey is a very popular tool among system administrators as it helps automate package management for Windows. Since Chocolatey can be u...