Skip to content

Instantly share code, notes, and snippets.

@jcpowermac
Created December 11, 2013 18:47
Show Gist options
  • Select an option

  • Save jcpowermac/7916128 to your computer and use it in GitHub Desktop.

Select an option

Save jcpowermac/7916128 to your computer and use it in GitHub Desktop.
Disable Hardware Accelerated Move
$vcenterhost = "vcenter_host"
# Set to zero (0) to disable or one (1) to enable.
$intValue = 0;
set-PowerCLIConfiguration -DefaultVIServerMode multiple -Confirm:$false;
Connect-VIServer -Server $vcenterhost
Write-Host -BackgroundColor Red -ForegroundColor White "*** Prompting for ESX(i) host password ***";
$cred = Get-Credential
$vmhosts = Get-VMHost
foreach( $vmhost in $vmhosts ) {
$hostConn = Connect-VIServer -Server $vmhost.Name -Credential $cred;
$esxcli = get-EsxCli -Server $hostConn;
$esxcli.system.settings.advanced.set($null,$intValue,"/DataMover/HardwareAcceleratedMove",$null);
#check value
$hwm = $esxcli.system.settings.advanced.list() | where {$_.Path -eq "/DataMover/HardwareAcceleratedMove"}
if( $hwm.IntValue -eq $intValue ) {
Write-Host -ForegroundColor Green "$vmhost HardwareAcceleratedMove configured to $intValue";
}
else {
Write-Host -BackgroundColor Red -ForegroundColor White "WARNING: $vmhost HardwareAcceleratedMove NOT configured to $intValue";
}
Disconnect-VIServer -Server $hostConn -Confirm:$false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment