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

  • 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 45 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

    1127 Downloads

    0 Comments

    Updated 2 years ago

  • Sample 2 Node vSAN Deployment Script

    Contributor Jasemccarty

    I started some of this with PowerCLI 6.x and have recently only used it with PowerCLI 10.x  vSphere 6.5 Update 1 (July 2017) is the earliest build I've validated it on lately - Your Mileage May Vary o ...
    VMware PowerCLI PowerShell
    Download

    86 Downloads

    0 Comments

    Updated 5 months ago

  • Delete all disk groups of a vSAN ruthlessly

    Contributor IchbinTonyWu

    This script is to delete all disk groups when vSAN is enabled, and you just want to delete the existing DGs without caring the data on it. Please use it when you only want to delete them all and want ...
    vSAN PowerShell
    Download

    38 Downloads

    0 Comments

    Updated 2 months ago

  • Retrieving detailed per-VM space utilization on VSAN

    Contributor lamw

    For more details, please see https://www.virtuallyghetto.com/2018/06/retrieving-detailed-per-vm-space-utilization-on-vsan.html Get-VSANVMDetailedUsage -Cluster "VSAN-Cluster" VM File Type physica ...
    vSAN PowerShell
    Download

    57 Downloads

    0 Comments

    Updated 3 months ago

  • List Folders on a VSAN Datastore using PowerCLI

    Contributor lamw

    This sample lists the "friendly name" of the top level folders of a VSAN Datastore. VSAN uses UUID to reference everythign and you just need to use the vSphere API to translate to the friendly name pr ...
    VMware Cloud on AWS VMware PowerCLI PowerShell
    Download

    24 Downloads

    0 Comments

    Updated 1 month ago

  • Sample RVC Style Report using PowerCLI 11

    Contributor Jasemccarty

    This is the first of many RVC Style Functions that use PowerCLI 11 to mimic some of the tasks available in the Ruby vSphere Console for vSAN Requires William Lam's VSANUUIDtoVM Function, located here: ...
    VMware PowerCLI PowerShell
    Download

    14 Downloads

    0 Comments

    Updated 10 days ago

  • vSAN Cluster Management

    Contributor lamw

    Exploring VSAN APIs Part 1 - Enable VSAN Cluster | virtuallyGhettohttp://www.virtuallyghetto.com/2014/03/exploring-vsan-apis-part-1-enable-vsan-cluster.html vGhetto Script Repository This repositor ...
    vSphere Perl SDK Perl
    Download

    126 Downloads

    0 Comments

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

    133 Downloads

    1 Favorite

    1 Comment

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

    85 Downloads

    0 Comments

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

    101 Downloads

    0 Comments

    Updated 2 months ago