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 21 Results Sample vcenter
  • vmware-collect

    Contributor szemmali

    This script will Listed of all VMs and Snapshot information By vCenter with Login/password and Active directory account :)
    VMware PowerCLI PowerShell
    Download

    208 Downloads

    1 Favorite

    0 Comments

    Updated 4 months ago

  • Get or Create vRO Configuration Element

    Contributor standvirtual

    Returns the Configuration Element based on the given Configuration Category Path and Configuration Element Name.  If it does not exist, Configuration Category and Configuration Element are created.  I ...
    vRealize Orchestrator JavaScript
    Download

    129 Downloads

    0 Comments

    Updated 6 months ago

  • Change Path Policy ESXi RR V 01

    Contributor szemmali

    Overview: vCollect provides a PowerCLI scripts that produce infrastructure audit and reports of VMware SDDC (vSphere, NSX, vCloud DIrector, vRealize Automation) environments in CSV or Excel file forma ...
    VMware PowerCLI PowerShell
    Download

    137 Downloads

    2 Favorites

    0 Comments

    Updated 23 days ago

  • Add New Disk To vCenter VM

    Contributor standvirtual

    Creates a new virtual disk and adds it to a virtual machine.  If number of nodes on a SCSI Controller exceeds the limit, a new SCSI Controller is created. Type of new SCSI controller created is same a ...
    vRealize Orchestrator vRealize Orchestrator Plug-in SDK JavaScript
    Download

    165 Downloads

    0 Comments

    Updated 6 months ago

  • vCenter Roles

    Contributor rnelson0

    vCenter-roles Import pre-defined roles for common applications to access vCenter. The privileges for each role are stored in a JSON-format file as a list of privilege Ids (Get-VIPrivilege | Select Id) ...
    vSphere Management SDK PowerShell
    Download

    148 Downloads

    0 Comments

    Updated 3 years ago

  • Manage security profile services of an ESXi Host in vCenter

    Contributor tnavarro1

    Start, stop, restart, or uninstall security profile services of an ESXi Host in vCenter. Optionally, specify whether a service policy is to start automatically when ports are open (automatic), start w ...
    vRealize Orchestrator Plug-in SDK JavaScript
    Download

    477 Downloads

    1 Favorite

    0 Comments

    Updated 2 years ago

  • Regenerate a new MAC address for a vCenter VM

    Contributor tnavarro1

    Reconfigure a vCenter VM so that it generates a new MAC address at the next reboot, given the old MAC. Returns null if no matching MAC address was found on the VM.
    vRealize Orchestrator Plug-in SDK JavaScript
    Download

    428 Downloads

    0 Comments

    Updated 2 years ago

  • Assign a vCenter tag to a VM via VAPI

    Contributor tnavarro1

    Assign a vCenter tag to a VM via VAPI
    vRealize Orchestrator Plug-in SDK JavaScript
    Download

    282 Downloads

    0 Comments

    Updated 2 years ago

  • Get all compatible Datastores for a vCenter Host and VM

    Contributor tnavarro1

    Get all compatible datastores for a given host, resource pool, and virtual machine. The datstore must have enough free storage space necessary for the VM, and must be accessible and not in an overall ...
    vRealize Orchestrator Plug-in SDK JavaScript
    Download

    1375 Downloads

    0 Comments

    Updated 1 year ago

  • Get Cluster by Name

    Contributor tnavarro1

    Finds and returns the vCenter ClusterComputeResource with the given name, case-insensitive. Also demonstrates how to do a case-insensitive search via xpath, as supported by the Javascript version of v ...
    vRealize Orchestrator Plug-in SDK JavaScript
    Download

    215 Downloads

    0 Comments

    Updated 1 year ago