Reply to Message

View discussion in a popup

Replying to:
LucD
Leadership
Leadership

I think Chip's reply might be a bit harsh :smileygrin:

There is indeed quite some information available on how to suppress the message, but the KB only mentions a manual method (shame on you KB :smileygrin:).

And since this is a community around 'automation', and since changing it in an automated way is not so straight-forward (at least it wasn't to me), attached a script I use.

$arg = @{

  option   = '/UserVars/SuppressHyperthreadWarning'

  intvalue = 1

}

Get-VMHost | ForEach-Object -Process {

  $esxcli = Get-EsxCli -VMHost $_ -v2

  $opt = $esxcli.system.settings.advanced.list.Invoke() | where {$_.Path -eq '/UserVars/SuppressHyperthreadWarning'}

  if ($opt) {

   if ($opt.intvalue -ne 1) {

   $esxcli.system.settings.advanced.set.Invoke($arg)

   }

   else {

   Write-Output "Setting already correct on $($esxcli.VMHost.Name)"

   }

  }

  else { 

   Write-Output "Setting not present on $($esxcli.VMHost.Name)"

  }

}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference