Skip to content
InSpec VMware Resource Pack (Incubation)
Branch: master
Clone or download
juliandunn and jerryaldrichiii Fix required version of InSpec in inspec.yml as well. (#30)
Signed-off-by: Julian C. Dunn <>
Latest commit fcc933b Oct 16, 2018

InSpec VMware

This repository contains a collection of InSpec resources used to interact with the VMware platform.

This resource pack requires an InSpec version greater than 2.2.34

Using this Resource Pack

In order to use the resources in this resource pack you must declare the dependency in your InSpec profile.


  - name: inspec-vmware

Using the VMware Target

After defining a dependency on inspec-vmware in your_profile you are ready to use these resources with the vmware:// target.

Via Arguments

~$ inspec exec your_profile -t vmware://USERNAME@VISERVER --password MY_PASSWORD

Via Environment Variables

~$ export VISERVER=
~$ export VISERVER_USERNAME=demouser
~$ export VISERVER_PASSWORD=s0m3t1ngs3cuRe
~$ inspec exec inspec-vmware -t vmware://

Via the InSpec Shell

~$ inspec shell -t vmware://USERNAME@VISERVER --password MY_PASSWORD --depends ./inspec-vmware


We have a cookbook that can install PowerCLI leveraging Chef also.


Install PowerCLI on Windows 2012R2

PS > Invoke-WebRequest -Uri "" -OutFile PackageManagement.msi
PS > msiexec.exe /i C:\Users\vagrant\PackageManagement.msi /quiet
PS > Set-PSRepository -Name "PSGallery" -InstallationPolicy "Trusted"
PS > Install-Module -Name VMware.PowerCLI

Install PowerCLI on Windows 10, 2016+

PS > Set-PSRepository -Name "PSGallery" -InstallationPolicy "Trusted"
PS > Install-Module -Name VMware.PowerCLI


Install PowerCLI on Debian based OSs

~$ sudo apt-get install curl
~$ curl > MS.key
~$ sudo apt-key add MS.key
~$ curl | sudo tee /etc/apt/sources.list.d/microsoft.list
~$ sudo apt-get update
~$ sudo apt-get install -y powershell
~$ pwsh -Command "& {Set-PSRepository -Name PSGallery -InstallationPolicy Trusted}"
~$ pwsh -Command "& {Install-Module -Name VMware.PowerCLI -Force}"

Install PowerCLI on Redhat based OSs

~$ curl > /etc/yum.repos.d/microsoft.repo
~$ yum install powershell
~$ pwsh -Command "& {Set-PSRepository -Name PSGallery -InstallationPolicy Trusted}"
~$ pwsh -Command "& {Install-Module -Name VMware.PowerCLI -Force}"


Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

You can’t perform that action at this time.