VIBSearch Finding VIB versions

VIBSearch is a simple PowerShell script with a GUI that will search for a specified VIB or all the VIBS installed on the ESXi hosts. A VIB stands for vSphere Installation Bundle (VIB). VIBs are used to package and distribute ESXi software such as drivers. The GUI is designed with SAPIEN PowerShell Studio 2014.

With VIBSearch it is easily to verify that all the ESXi host in the cluster have the same VIB versions installed. VIBSearch can be used for example to easily identify the HP-AMS driver version on all the ESXi hosts.

Requirements

VIBSearch is tested with:

  • PowerShell 5
  • The latests PowerCLI modules
  • For the Out-GridView cmdlet, PowerShell ISE is needed. Install ISE by using the following PowerShell commands:
    • Import-Module ServerManager
    • Add-WindowsFeature PowerShell-ISE

Installing and executing VIBSearch

  • Download VIBSearch.txt, link
  • Open PowerShell and execute:
    • Set-ExecutionPolicy  unrestricted
    • ./vibsearch.ps1

After executing the script the following GUI appears:

0

  • To connect enter the FQDN or IP address of the vCenter name (1) and click on Connect (2) button

1

  • A credential window appear, enter the credentials for authenticating (administrator) to the vCenter Server. For a domain login use: user user@domainname  or domainname\username

5

  • After successfully authenticating to the vCenter Server there are two options to choose:
    • List All the VIBS:  List all the ESXi hosts in the vCenter Server
    • Search VIB: specify a VIB name for example “HP-AMS”

6

If authentication to the vCenter Server fails the following error is displayed in the PowerShell window:

authen

Example output:

HP-AMS VIB versions

hpams

Intel NIC VIB “net-igb” versions

Intel

NVIDIA VIB versions:

nvidia

Thanks to Francois-Xavier Cat (@LazyWinAdm) for helping me with the VIBSearch tool.

 

Display VMware Horizon View Pool information using PowerCLI

For a VMware View Horizon Healthcheck I needed to display all VMware View Pools created and export some settings for documentation. The easiest way to do this is using View PowerCLI on a VMware View Connection server.

Here are some examples to use:

Display all the pools and settings:

get-pool

Display the pools with selected fields in table form:

Get-pool | select DisplayName,Pool_ID,Enabled,MinimumCount,MaximumCount,HeadroomCount,Persistence,Pooltype,Protocol | FT -AutoSize

image

Display the some fields in table form and export the pool information to a a text file:

get-pool | select DisplayName,Pool_ID,Enabled,MinimumCount,MaximumCount,HeadroomCount,Persistence,Pooltype,Protocol | FT -AutoSize | out-file c:\temp\pools.txt

The get-pool commands does not export all the settings that can be provided in a VMware View pool.

Backup the ESXi configuration and update the status in vCenter

I create a simple PowerCLI script that backups all the ESXi hosts configurations that are connected in a vCenter server and displays the backup status in vCenter. To display the backup status in vCenter I created a global custom attribute called “Last ESXi Backup”.

image

After the ESXi PowerCLI backup script runs the  “Last ESXi backup” field is updated with the current date.When the script is started the map that stores the ESXi configuration files is copied to an old map.

Here is an example how it looks  in VMware Web Client:

image

And an example how it looks in the vSphere Client:

image

The script can be scheduled to make for example every week a backup of the ESXi server configs. You can easily customize the script for your own needs.

PowerCLI Script:

<# .SYNOPSIS Backup ESXi configration .VERSION 1.0 .DESCRIPTION Backups the configuration of all the ESXi servers .NOTES Author(s): Ivo Beerens Create a global custom field called "Last ESXi Backup" on the vCenter server .EXAMPLE ./BackupESXi.ps1 .Changes #>

#Load PowerCLI
Add-PSSnapin vmware.VimAutomation.core -ErrorAction SilentlyContinue

#Variables
$Folder = “E:\Backup\ESXi”
$FolderOld = “E:\Backup\ESXi\Old”
$Date = Get-Date -f dd-MM-yyy

# Connect to local vCenter Server
Connect-ViServer localhost

# Move existing backup files to the old directory
mv ($Folder + "\*.tgz") $FolderOld -force -ErrorAction SilentlyContinue

# Backkup ESXi configuration
Get-VMHost | Foreach {
$_ | get-vmhostfirmware -BackupConfiguration -DestinationPath $folder
$_ | Set-CustomField -name "Last ESXi Backup" -value "$Date"
}

# Disconnect session vCenter 
Disconnect-VIserver -Confirm:$false