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
- HCX Migration Scripts... . HCX Migration Scripts These are the migration scripts that I produced with Bilal Ahmed, to automate the HCX migrations and failback capabilities. Blog Posts These blog posts describe the usage ...VMware HCX 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
- PowerCLI Port of RVC commands vsan.health.cluster_proxy_configure and vsan.health.cluster_proxy_statusThis script contains 2 Functions that can get or set the vSAN Proxy Configuration. These align with the following RVC commands: vsan.health.cluster_proxy_configure vsan.health.cluster_proxy_statusVMware PowerCLI PowerShell
- Skyline FixerRun this code with your CSV output and it will talk to the vcenter and change the ESX and/or VM settings. It currently is working for ntp and syslog, but you can add more KB options. I will upload a ...VMware {code} PowerShell
- Function Remove-ContentLibraryItemFunction to remove an item in a Content Library. Tested on vCenter 6.5 & 6.7VMware PowerCLI PowerShell
- PowerCLI Port of RVC commands vsan.apply_license_to_clusterThis script can be used to: Add a license to vCenter if it hasn't already been added Assign that license to a specified cluster The script includes a function which can be invoked using the followi ...VMware PowerCLI PowerShell
- PowerCLI Port of RVC command vsan.stretchedcluster.witness_infoThis script includes a function that reports the vSAN Witness information for a 2 Node or Stretched vSAN Cluster. Information included is: Cluster Name Witness Host Name Witness Uuid Witness IP Addre ...VMware PowerCLI PowerShell
- Listing vSphere Alarms - Get-TriggeredAlarmThis function lists the triggered alarms for the specified entity in vCenter. More information available: https://blogs.vmware.com/PowerCLI/2019/11/new-vsphere-alarm-management.htmlVMware PowerCLI vSphere PowerShell
- Get Horizon EntitlementsThis script connects to a Horizon Connection Server and returns all desktop and app pool entitlement groups & users in the PodHorizon - View Power CLI PowerShell