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

  • Application Management Services

  • Automation Tools

  • Cloud Management Platform

  • Cloud Native Applications

  • Data Center & Cloud Infrastructure

  • Desktop & Application Virtualization

  • Developer Tools

  • Enterprise Mobility Management

  • Hybrid Cloud & Data Center Infrastructure

  • Networking & Security

  • Storage & Availability

  • Other Platform

Contributor

Language

1 - 10 of 41 Results Sample vSAN
  • VSAN DIsk Decommission Script

    Contributor chenwei621

    After disable vsan in vsphere, executing this script within each ESXi host can decommission all disk groups.
    vSphere CLI Shell Script
    Download

    1074 Downloads

    0 Comments

    Updated 2 years ago

  • vSAN Health

    Contributor Techie01

    Python SDK based script which provides vsan health information about controller and driver. Python <scriptname> -i <VC-IP>  -c <vsan_cluster_name> -u <VC_username> -p <VC_Password> To run this script, ...
    vSAN Management SDK for Python Python
    Download

    77 Downloads

    0 Comments

    Updated 3 months ago

  • Home Lab Deployment

    Contributor alanrenouf

    Script to automate the build of a home lab to vSphere 6.5, this script starts from ESX and configures VSAN, deploys vCenter and configures it and adds William Lams Content Library
    VMware PowerCLI PowerShell
    Download

    907 Downloads

    0 Comments

    Updated 1 year ago

  • VMware Virtual SAN -- All Flash Automated Deployment for Stretched Cluster

    Contributor alanrenouf

    vSAN All Flash Automated Deployment For Stretched ClusterVMware Virtual SAN -- All Flash Automated Deployment for Stretched Cluster
    VMware PowerCLI PowerShell
    Download

    164 Downloads

    0 Comments

    Updated 1 year ago

  • Backup or Restore SPBM Profiles in vCenter

    Contributor Jasemccarty

    This script will either export SPBM policies to a folder or import SPBM policies from a folder. Tested on vCenter 6.5 with PowerCLI 6.5, but should work with earlier versions. Syntax is: To Backup SPB ...
    VMware PowerCLI PowerShell
    Download

    106 Downloads

    1 Favorite

    1 Comment

    Updated 2 months ago

  • Set the VSAN.DefaultHostDecommissionMode on all hosts in a cluster

    Contributor gbanger35

    This script allows a user to set the VSAN.DefaultHostDecommissionMode on all hosts in a cluster. On ocassions there may be a need to change the setting to something other than the default. Whilst this ...
    VMware PowerCLI PowerShell
    Download

    91 Downloads

    0 Comments

    Updated 1 year ago

  • Home Lab Delete Settings

    Contributor alanrenouf

    Used to delete the home lab as configured by the Home Lab Script here: https://developercenter.vmware.com/samples/1463/home-lab-deployment?h=Sample
    VMware PowerCLI PowerShell
    Download

    131 Downloads

    0 Comments

    Updated 1 year ago

  • NVME Information

    Contributor alanrenouf

    Find details on the NVMe devices attached to an ESXi Host
    VMware PowerCLI PowerShell
    Download

    82 Downloads

    0 Comments

    Updated 1 year ago

  • vSAN 6.x Stretched Cluster and 2 Node PowerCLI Module

    Contributor Jasemccarty

    Module for vSAN Stretched Cluster & 2 Node I took some of my existing scripts and combined them into a module Setup requires the psd1/psm1 files to be put in a VSANSC2N directory under Powershell Modu ...
    VMware PowerCLI PowerShell
    Download

    98 Downloads

    2 Comments

    Updated 1 month ago

  • vSAN Cluster Maintenance

    Contributor tifosi1988

    In a cluster without DRS enabled, user should manually migrate the virtual machines off a host to let the host enter Maintenance Mode. This sample script can automate this process and let the hosts en ...
    VMware PowerCLI PowerShell
    Download

    59 Downloads

    0 Comments

    Updated 4 months ago