it is throwing an error here -
Get-VMHost-Name$esxNames-PipelineVariableesx|
Get-VMHost : Cannot validate argument on parameter 'Name'. The argument is null or empty. Provide an argument that is
not null or empty, and then try the command again.
At C:\MVstuff\Network-DriverFW-Check\Network-Driver-FW-version-Check.ps1:4 <file:///C:\MVstuff\Network-DriverFW-Check\Network-Driver-FW-version-Check.ps1:4> char:18
+ Get-VMHost -Name $esxNames -PipelineVariable esx |
+ ~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Get-VMHost], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVMHost