https://kb.vmware.com/s/article/88201 provides a workaround using esxcli to the stated issue. Can someone translate that to a PowerCLI method so one might deploy the solution to a large base of ESXi hosts?
Part of my frustration is there is no esxcli command provided to verify the setting change, so I cannot determine if my setting attempts are successful.
What is the counterpart to:
esxcli system settings advanced set -i 0 -o /SE/BFEnabled
to determine if the filter is disabled?
You could do something like this
$esxName = 'MyEsx'
$esxcli = Get-EsxCli -VMHost $esxName -V2
$result = $esxcli.system.settings.advanced.list.Invoke(@{option = '/SE/BFEnabled'})
if($result.intvalue -ne 0){
$esxcli.system.settings.advanced.set.Invoke((@{option = '/SE/BFEnabled'; intvalue = 0 })
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You could do something like this
$esxName = 'MyEsx'
$esxcli = Get-EsxCli -VMHost $esxName -V2
$result = $esxcli.system.settings.advanced.list.Invoke(@{option = '/SE/BFEnabled'})
if($result.intvalue -ne 0){
$esxcli.system.settings.advanced.set.Invoke((@{option = '/SE/BFEnabled'; intvalue = 0 })
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
$esxcli.system.settings.advanced.list.Invoke(@{option='/SE/BFEnabled'})
Exception calling "Invoke" with "1" argument(s): "A specified parameter was not correct: argument[0]"
Never mind. Seemingly a stale PS object (PS session was left open overnight - my local PS session environment has been known to timeout certain connection types). Refreshing the $esxcli object worked.
Looks like you forgot the V2 switch on the Get-EsxCli cmdlet
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I'm pretty sure it was not a "stale PS object", whatever that may be.
That error comes when you don't use the V2 switch and use the Invoke method.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference