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

SDK / Platform / Tool

  • App Modernization

  • Cloud Management

  • Compute Virtualization

  • Desktop & App Virtualization

  • Developer Tools

  • Digital Workspace

  • Hybrid Cloud & Data Center Infrastructure

  • Hyperconverged Infrastructure

  • Multi-Cloud Operations

  • Private & Hybrid Cloud

  • Storage & Availability

  • Virtual Cloud Networking

  • Other Platform

Contributor

Language

1 - 10 of 22 Results Sample vSphere API
  • Get-VCSACerts.ps1

    Contributor Mark McGill

    ... <#     .NOTES         Author: Mark McGill, VMware         Last Edit: 5-4-2021         Version 1.3     .SYNOPSIS         Returns vCenter certificate information for all VCSA certificates, and optio ...
    vSphere PowerShell
    Download

    222 Downloads

    1 Comment

    Updated 4 months ago

  • Relocate Virtual Machine

    Contributor Selvakumar Jaganathan

    This vRO will relocates virtual machine and it's disks to another host or datastore while the virtual machine is powered on.
    vRealize Orchestrator Plug-in SDK vRO Workflow
    Download

    263 Downloads

    0 Comments

    Updated 3 years ago

  • Modify VM RAM CPU and HardDisk at a time with specified values using vSphere java API

    Contributor Kiran Kumar P

    Description: Modify(or Update) VM RAM, CPU and HardDisk at a time with specified values using vSphere java API. Input & Steps:: 1) CPU(numCPUs) - Provide num of cpus count,it never exceed host support ...
    vSphere Management SDK Java
    Download

    671 Downloads

    0 Comments

    Updated 5 years ago

  • Add Hosts into DVSwitch using vSphere java api

    Contributor Kiran Kumar P

    Description: Adds specified number of ESXi hosts into dvSwitch using vSphere java API.  Here it will find the first free pnic from each ESXi host and then add it to Uplink1 otherwise it will skip that ...
    vSphere Management SDK Java
    Download

    667 Downloads

    1 Comment

    Updated 5 years ago

  • Powerful placeVM API which uses DRS to get recommendations to place the VMs and its virtual disks

    Contributor VIKAS SHITOLE

    ... //:: # Author: Vikas Shitole //:: # Website: www.vThinkBeyondVM.com //:: # Product/Feature: vCenter Server/DRS //:: # Reference: //:: # Description: Tutorial: PlaceVM API: Live relocate a VM from ...
    vSphere Management SDK Java
    Download

    524 Downloads

    0 Comments

    Updated 5 years ago

  • Report on VMs with multi-writer flag enabled

    Contributor VIKAS SHITOLE

    What this script does: This script connects to the vCenter Server and prepares a report on All VMs with at-least one disk enabled with "Multi-Writer" sharing. Author:  Vikas Shitole   www.vThinkBeyond ...
    VMware PowerCLI vSphere Management SDK PowerShell
    Download

    790 Downloads

    1 Comment

    Updated 3 years ago

  • Getting Cluster usage data on CPU Memory and Storage resources

    Contributor VIKAS SHITOLE

    What this script does: Report on Cluster usage/capacity data on CPU, Memory and Storage resources across all the cluster in a vCenter server. Author:  Vikas Shitole   www.vThinkBeyondVM.com    
    vSphere Management SDK VMware PowerCLI PowerShell
    Download

    1282 Downloads

    1 Comment

    Updated 4 years ago

  • DRS Rules For all VMs In Cluster

    Contributor VIKAS SHITOLE

    What this script does: Report on DRS cluster VMs and its assciated VM-VM affinity/anti affinity rules. Author: Vikas Shitole www.vThinkBeyondVM.com
    vSphere Management SDK VMware PowerCLI PowerShell
    Download

    770 Downloads

    0 Comments

    Updated 5 years ago

  • Add NFS Datastore in ESXi

    Contributor Kiran Kumar P

    ... //:: # Description: Creating/Mounting NFS datastore in ESXi(no connection to vCenter server) using vSphere API.  //::# How to run this sample: http://vthinkbeyondvm.com/getting-started-with-yavi-j ...
    vSphere Management SDK Java
    Download

    830 Downloads

    0 Comments

    Updated 5 years ago

  • Reconfigure ESXi host for HA

    Contributor Juan Manuel Rey Portal

    Script in python, using pyVmomi library, that performs a Reconfigure for HA operation on an ESXi host that is part of vSphere HA cluster. Provide the vCenter host, user, password and ESXi host as argu ...
    vSphere Management SDK Python
    Download

    771 Downloads

    0 Comments

    Updated 6 years ago