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 43 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

    1098 Downloads

    0 Comments

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

    970 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

    143 Downloads

    0 Comments

    Updated 1 year ago

  • Set Sparse Swap files for vSAN 6.2 or Greater

    Contributor Jasemccarty

    ...   One of the Space Efficiency features of vSAN 6.2 that is available for both All-Flash and Hybrid configurations, is the introduction of Sparse Virtual Swap files. Swap files on vSAN by default, ...
    VMware PowerCLI PowerShell
    Download

    111 Downloads

    0 Comments

    Updated 4 months ago

  • PowerCLI vSAN Witness Deployment

    Contributor Jasemccarty

    This script deploys a vSAN 6.5 Witness Appliance, configures networking, adds it to vCenter, sets static routes, and makes the Witness Host available for use in a vSAN Stretched or 2 Node Cluster Synt ...
    VMware PowerCLI PowerShell
    Download

    188 Downloads

    0 Comments

    Updated 1 year ago

  • PowerCLI vSAN Witness Replacement

    Contributor Jasemccarty

    This script removes a Witness host for 2 Node and Stretched Cluster vSAN & replaces it. In the event the Witness host is no longer available, this script disables the Stretched Cluster and immediately ...
    VMware PowerCLI PowerShell
    Download

    140 Downloads

    0 Comments

    Updated 6 months ago

  • vSphere or ESXi - Enable or Disable TCP Segmentation Offload and Large Receive Offload

    Contributor Jasemccarty

    This script sets TSO/LRO Settings for Physical NICs PSOD w/ESXi 5.x/6.x when using Intel X710 NICs https://kb.vmware.com/kb/2126909 To enable/disable TSO/LRO on pNics Syntax is: Vsan-SetTsoLro.ps1 -VI ...
    VMware PowerCLI PowerShell
    Download

    120 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

    115 Downloads

    1 Favorite

    1 Comment

    Updated 4 months ago

  • Disable Dedupe Scan for Hybrid vSAN 6.2

    Contributor Jasemccarty

    Simple PowerCLI scripts to Get/Set the Deduplication Scanner settings for a Hybrid vSAN 6.2 Not officially supported by VMware. Syntax: Set-DedupeScan.ps1 -ClusterName <ClusterName> -DedupeScan disabl ...
    VMware PowerCLI PowerShell
    Download

    69 Downloads

    0 Comments

    Updated 4 months 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

    90 Downloads

    0 Comments

    Updated 23 days ago