Created
December 11, 2013 18:47
-
-
Save jcpowermac/7916128 to your computer and use it in GitHub Desktop.
Disable Hardware Accelerated Move
This file contains hidden or 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
| $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