Skip to content

Instantly share code, notes, and snippets.

@vmwarecode
Created October 3, 2016 06:24
Show Gist options
  • Save vmwarecode/3655176f362c7fd1fb430616e9191c71 to your computer and use it in GitHub Desktop.
Save vmwarecode/3655176f362c7fd1fb430616e9191c71 to your computer and use it in GitHub Desktop.
Set the VSAN Disk Autoclaim Mode for VSAN Hosts.
#Set the VSAN Host autoclaim mode for VSAN. (This script disables autoclaim)
# Reference: http://www.virtuallyghetto.com/2013/09/additional-steps-required-to-completely.html
$hosts = Get-Cluster VSAN-Cluster | Get-VMHost
foreach($vihost in $hosts)
{$esxcli = get-vmhost $vihost | Get-EsxCli
$esxcli.vsan.storage.automode.set($true) | out-null}
Write-Host "Setting VSAN Disk AutoClaim Mode to 'False'"
sleep 5
Write-Host "Done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment