Tag Archives: PowerCLI

Get- and Set-VMLatencySensitivity PowerShell Function

The Get-VMLatencySensitivity, Get-VMLatencySensitivityBulk and Set-VMLatencySensitivity PowerShell functions configure can return and set the latency sensitivity level of a virtual machine. You can adjust the latency sensitivity of a virtual machine to optimize the scheduling delay for latency sensitive applications.

The function is part of my Virten.net.VimAutomation module, which is a set of PowerShell function built for managing, troubleshooting and automating VMware based platforms. The module can be easily obtained from the PowerShell Gallery and is available on GitHub.

Read more »

Get-VMHostVersion and Get-VMHostLatestVersion PowerShell Function

The Get-VMHostVersion and Get-VMHostLatestVersion PowerShell functions are aimed at helping you to identify the version at which your ESXi is currently running, and whether updates are available. Both are using a JSON based ESXi Build database which is also the backend for the ESXi Build Number History provided by virten.net.

The function is part of my Virten.net.VimAutomation module, which is a set of PowerShell function built for managing, troubleshooting and automating VMware based platforms. The module can be easily obtained from the PowerShell Gallery and is available on GitHub.

Read more »

Convert-ScsiCode PowerShell Function

The Convert-ScsiCode PowerShell function decodes SCSI sense codes found in the vmkernel.log from ESXi hosts. It uses a JSON based SCSI Code database provided by virten.net. The function works just like my web-based SCSI Sense Code Decoder but allows you to integrate it in your automation scripts.

The function is part of my Virten.net.VimAutomation module, which is a set of PowerShell function built for managing, troubleshooting and automating VMware based platforms. The module can be easily obtained from the PowerShell Gallery and is available on GitHub.

Read more »

How to use ESXCLI v2 Commands in PowerCLI

PowerCLI, a set of PowerShell extensions for vSphere, is a great tool for automating VMware configuration and management tasks. It allows you to change a lot of ESXi host and vCenter settings. A powerful cmdlet is Get-EsxCli which allows you to run ESXCLI tasks from your PowerCLI console. ESXCLI is the main configuration command on an ESXi host.

This post explains how to use the Get-EsxCli cmdlet with the new V2 interface, which is much more intuitive than the old method.

get-esxcli

Read more »

Getting Started with PowerCLI for Linux (PowerCLI Core)

powerclicoreBased on Microsoft PowerShell Core which enables users to use PowerShell on Linux, Mac and Docker, VMware has started to make PowerCLI compatible with the new PowerShell. This allows to run scripts that were previously only available for Windows on Linux or Mac based systems.

In this post I am going to give a quick startup guide to the installation and configuration of PowerCLI Core.

Read more »

How to properly initialize PowerCLI 6.x in PowerShell ISE

With the release of vSphere 6.0 VMware has started to transform their distribution model of PowerCLI cmdlets from PSSnapins into modules. This is a good thing because modules are the preferred method of adding cmdlets to PowerShell. Unfortunately the changed behavior breaks plenty instructions on how to load VMware PowerCLI in ISE, including my own. The old method works for core cmdlets, but functions related to Distributed Switches or Storage Policies for example are missing.

If you have the latest version of PowerCLI installed but cmdlets are missing in PowerShell ISE, maybe you are using the old method to load cmdlets.

Get-VDSwitch : The term 'Get-VDSwitch' is not recognized as the name of a cmdlet, function, script file, or operable program.

Read more »

vSphere 6.0 Performance Metrics - What is CPU Readiness?

I haven't seen this in any announcement, but there is a new performance metric in vSphere 6.0 called CPU Readiness which is according to the description:

Percent of time the virtual machine is unable to run because it is contending for access to the physical CPU(s).

vsphere-6-cpu-readiness-legend

Read more »

vSphere 6.0 - How to use ESXCLI Commands in PowerCLI

PowerCLI, a set of PowerShell extensions for vSphere, is a great tool for automating VMware configuration and management tasks. It allows you to change a lot of ESXi host and vCenter settings. One powerful cmdlet is Get-EsxCli which allows you to run ESXCLI tasks from your PowerCLI console. ESXCLI is the main configuration command on an ESXi host. This post explains how to use the Get-EsxCli cmdlet.

get-esxcli

Read more »

Create an ESXi ISO that contains all Patches

VMware does only provide installable ISO files for updates (Bold entries of my ESXi Build List), not for patches. This post explains how you can quickly create an installable that contains all patches.

latest-esxi-installable

Read more »

PowerCLI Script to Calculate VSAN VSPP Points

VMware includes Virtual SAN in their VSPP program. Unfortunately their vCloud Usage Meter, the tool that helps to create a license report, does not support Virtual SAN by now. I wrote a little PowerCLI script to gather the required information.

vsan-vspp-script

Read more »