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

  • Enterprise Mobility Management

  • Hybrid Cloud & Data Center Infrastructure

  • Networking & Security

  • Storage & Availability

  • Other Platform

Contributor

Language

1 - 10 of 57 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

    1463 Downloads

    0 Comments

    Updated 3 years 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

    1381 Downloads

    1 Favorite

    0 Comments

    Updated 2 years 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

    438 Downloads

    0 Comments

    Updated 2 years 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

    413 Downloads

    0 Comments

    Updated 2 years 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

    243 Downloads

    0 Comments

    Updated 2 years ago

  • Set the VSAN Disk Autoclaim Mode for VSAN Hosts.

    Contributor gbanger35

    There occasions this needs to be done on a per host basis using ESXCLI. For this purpose I wrote a small script.
    VMware PowerCLI PowerShell
    Download

    191 Downloads

    0 Comments

    Updated 2 years ago

  • vSAN Storage Policy Example Creation

    Contributor jaredlutgen

    ... spbm-policy V1.0 Purpose: This script was built to help demonstrate the power of Storage policy based management. The script creates the following policies: vSAN No Protect - FTT-0 vSAN Basic Pro ...
    VMware PowerCLI PowerShell
    Download

    165 Downloads

    0 Comments

    Updated 2 years ago

  • vSAN 6.6 Encryption Rekey

    Contributor Jasemccarty

    This script will initiate a Rekey of a vSAN Cluster. Shallow Rekeying (KEK Only) or Deep Rekeying (DEK Also) are supported, as well as Reduced Redundancy if necessary. This requires PowerCLI 6.5.1 a ...
    VMware PowerCLI PowerShell
    Download

    309 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

    278 Downloads

    1 Favorite

    1 Comment

    Updated 1 year ago

  • 2 Node Forced Warm Cache for Hybrid vSAN

    Contributor Jasemccarty

    This script forces reads to occur across both hosts in a 2 Node vSAN configuration. More information on the how and why, can be found here: https://blogs.vmware.com/virtualblocks/2016/04/18/2node-read ...
    VMware PowerCLI PowerShell
    Download

    228 Downloads

    0 Comments

    Updated 1 year ago

;