Skip to content

Instantly share code, notes, and snippets.

@jeffgreenca
Created January 23, 2017 19:30
Show Gist options
  • Save jeffgreenca/2ef08f0f86b4321d8f9488ef64572dfa to your computer and use it in GitHub Desktop.
Save jeffgreenca/2ef08f0f86b4321d8f9488ef64572dfa to your computer and use it in GitHub Desktop.
Jason Coleman's script to turn off iovDisableIR per http://www.oshelp.co.uk/?p=96
$allHosts = get-folder unconfigured | get-vmhost | sort name
foreach ($thisHost in $allHosts){
$esxcli = get-esxcli -VMHost $thisHost -v2
if (($esxcli.system.settings.kernel.list.invoke() | ? {$_.name -like 'iovDisableIR'}).Configured -eq "TRUE"){
write-host "Working on $($thisHost.name)..."
$arguments = $esxcli.system.settings.kernel.set.CreateArgs()
$arguments.setting = "iovDisableIR"
$arguments.value = "FALSE"
$esxcli.system.settings.kernel.set.Invoke($arguments)
}
}
write-host "Please reboot $($allHosts.name -join(', '))"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment