This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Action Inputs: | |
// resourceId - string | |
// | |
//Return Type: string | |
var hosts = Server.findAllForType("vCACCAFE:VCACHost"); | |
var cafehost = hosts[0]; | |
var catalogResource = vCACCAFEEntitiesFinder.getCatalogResource(cafehost, resourceId); | |
return catalogResource.providerBinding.getBindingId(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# @file install_esxi_host_client | |
# Download and install the ESXi html client and patch | |
# @see https://labs.vmware.com/flings/esxi-embedded-host-client | |
# @author Alister Lewis-Bowen <alister@lewis-bowen.org> | |
set -e | |
is_installed() { | |
# @see https://gist.github.com/JamieMason/4761049 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Dennis Zimmer, company: opvizor GmbH | |
# HTML structure based on: | |
# http://www.myexchangeworld.com/2010/03/powershell-disk-space-html-email-report/ | |
# Script based on sVMotion history | |
# Source: http://www.lucd.info/2013/03/31/get-the-vmotionsvmotion-history/ | |
# Variables | |
$from = "sender@" | |
$to = "receiver@" | |
$subject = "VMware SVMotion Activities - $Date" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-VM | Select Name, id, @{Name="IP"; Expression={$_.VMHost | Get-VMHostNetwork | Select -ExpandProperty VirtualNic | where {$_.PortGroupName -match "dvpgManagement"} | Select IP}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$vm = Get-VM | |
$vmview = $vm | Get-View | |
Foreach ($v in $vmview){ | |
echo "-----------------------" | |
echo $v.Name | |
echo $v.Config.uuid | |
echo "-----------------------" | |
$Name = $v.Guest.HostName | |
If ($Name -ne $null -and $Name -ne ""){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Action Inputs | |
// cluster - VC:ClusterComputeResource | |
// | |
//Action Result: VC:HostSystem | |
var hosts = cluster.host; | |
var host; | |
for (var h in hosts) { | |
if (hosts[h].runtime.connectionState.value == "connected" && hosts[h].runtime.inMaintenanceMode == false) { | |
host = hosts[h]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Copyright 2016 VMware, Inc. All rights reserved. | |
2016-04-06 - Jase McCarty | |
To provide an exmple of VC side VSAN API access, it shows how to get VSAN cluster capacity | |
status by invoking the QuerySpaceUsage API of the | |
VsanSpaceUsage MO. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/bin/sh | |
echo "Leaving the VSAN Cluster..." | |
esxcli vsan cluster leave | |
echo "Done" | |
echo "Disabling Auto Mode..." | |
esxcli vsan storage automode set --enabled false | |
echo "Done" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# | |
# ******************************************************* | |
# Copyright VMware, Inc. 2014. All Rights Reserved. | |
# ******************************************************* | |
# | |
# DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT | |
# WARRANTIES OR CONDITIONS # OF ANY KIND, WHETHER ORAL OR WRITTEN, | |
# EXPRESS OR IMPLIED. THE AUTHOR SPECIFICALLY # DISCLAIMS ANY IMPLIED | |
# WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY # QUALITY, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################## | |
# | |
# PowerCLI Script to Patch Hosts | |
# Created by BLiebowitz on 3/4/2016 | |
# | |
######################################## | |
# Load PowerCLI Modules | |
if ( !(Get-Module -Name VMware.VimAutomation.Core -ErrorAction SilentlyContinue) ) { | |
. “C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1” |
OlderNewer