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

  • Enterprise Mobility Management

  • Hybrid Cloud & Data Center Infrastructure

  • Networking & Security

  • Storage & Availability

  • Other Platform

Contributor

Language

1 - 10 of 46 Results Sample PowerCLI
  • 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

    354 Downloads

    0 Comments

    Updated 1 year ago

  • VMware on AWS - 1 Node SDDC Deployment

    Contributor kmruddyVMW

    Use this script to easily deploy a 1 Node SDDC!
    VMware Cloud on AWS VMware Cloud on AWS API PowerShell
    Download

    483 Downloads

    1 Favorite

    0 Comments

    Updated 9 months ago

  • Using Import-VApp to upload OVA or OVF to VMware Cloud on AWS

    Contributor lamw

    This is a sample that uploads an OVA into VMware Cloud on AWS using the PowerCLI Import-VApp cmdlet.  Requirements: VPN established between your onPrem environment and the Management Compute Gateway ...
    VMware Cloud on AWS VMware PowerCLI PowerShell
    Download

    244 Downloads

    1 Comment

    Updated 4 months ago

  • vCheck vSphere

    Contributor alanrenouf

    vCheck-vSphere vCheck Daily Report for vSphere vCheck is a PowerShell HTML framework script, the script is designed to run as a scheduled task before you get into the office to present you with key ...
    VMware PowerCLI PowerShell
    Download

    7529 Downloads

    14 Favorites

    5 Comments

    Updated 1 year ago

  • Auto provision IO Analyzer Workloads

    Contributor JSchulz

    Automate the deployment of IO Workload VMs which can be used with the IO Analyzer fling to test storage performance.  If the IO Template is captured with the auto-login property set then this can comp ...
    VMware PowerCLI PowerShell
    Download

    311 Downloads

    0 Comments

    Updated 3 years ago

  • Remove all ESXi hosts from vCenter and readd them again.

    Contributor GoggiP365

    ****Remove all ESXi hosts from vCenter and readd them again.**** 
    vCloud Director PowerCLI PowerShell
    Download

    274 Downloads

    0 Comments

    Updated 3 years ago

  • Move ESX to a Datacenter

    Contributor nilmax

    Introduction and Purpose This sample code provides functions that moves an ESX to the location that is specified by the Datacenter parameter. Before running this sample, you can make sure you have the ...
    vSphere Management SDK PowerShell
    Download

    670 Downloads

    0 Comments

    Updated 2 years ago

  • NVME Information

    Contributor alanrenouf

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

    250 Downloads

    0 Comments

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

    241 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

    243 Downloads

    1 Favorite

    1 Comment

    Updated 1 year ago