VMware Sample Exchange
Browse and download code samples from VMware as well as code samples contributed by the VMware community. Log in to Sample Exchange using your MyVMware credentials to submit requests for new samples, contribute your own samples, as well as propose a sample as a solution for open requests.
Disclaimer: All sample content and code in Sample Exchange is licensed to you by the sample's author. VMware does not guarantee the samples; they are provided "AS IS". Use of this site is subject to the VMware Community Terms of Use.
Browse the list below for code samples from VMware and the community. You can filter the list of samples by selecting a platform or language, or enter other search keywords above.
Filters
Type
SDK / Platform / Tool
Contributor
Language
- Terraform template for deploying nested ESXi VMsThis project is intended to automatically provision infrastructure for events such as Hackathons. Getting Started Prerequisites Software 1+ vCenter instance (6.5, 6.7, & VMware Cloud on AWS account h ...vSphere VMware Cloud on AWS Other Language
- PowerCLI Set ESXi NTP Source - ESXi 6.7u3 and 7.0u3Set NTP Source Servers for VMware ESXi via PowerCLI - ESXi 6.7u3 and 7.0u3 .SYNOPSIS Set NTP Source Servers for VMware ESXi .DESCRIPTION Example is using Google NTP source IP. This is not for producti ...vSphere PowerShell
- Powercli script for compliance check of baseline with bulletinID as input - VC LevelThis script works at VC level, where it will iterate through all the Datacenters in that VC and provide the compliance report. What the script does: 1. Connects to the VC server 2. Creates a patch bas ...VMware PowerCLI PowerShell
- Powercli script for compliance check of baseline with bulletinID as input - Datacenter LevelThis powercli script works at the datacenter level. This takes datacenter name as the input and does a compliance check against that datacenter in a VC. What the script does: 1. Connects to the VC ser ...VMware PowerCLI PowerShell
- NSX Get Rules Count V 1 . 2This script uses PowerCLI and Posh-ssh ti retrieve the list of nsx rules applied ti VMs on ESXi hosts and counts the total of rules. This mainly helps identifiy any hosts that are reaching the 10 000 ...VMware PowerCLI PowerShell
- Uninstall VIB from multiple hosts using PowerCLIA PowerShell/PowerCLI script to remove a (or multiple) VIB(s) from one (or multiple) ESXi hosts.vSphere PowerShell
- Change VMware Tools location on multiple ESXi hostsA PowerCLI script to change the VMware Tools location on multiple ESXi hosts. Normally you'd do this through the Managed Object Browser Required vSphere 6.7U1 or newer!vSphere PowerShell
- Download and Install ESXi Host Client on all hosts in vCenterThis sample script will download the latest ESXi Host Client from the VMware Labs site and install on all hosts in vCenter, just change the vCenter name and credentials and make sure you have internet ...VMware PowerCLI PowerShell
- Importing VM annotation and notes from CSV file into vCenterAs in the earlier blog after exporting VM annotations, notes and other useful information to CSV/excel file, It was time to Import those information on new vCenter, This new vCenter has new Esxi Serve ...VMware PowerCLI PowerShell