You could do something like this
Get-Content VMHostNames.txt | %{
Get-VmHostService -VMHost $_ | ?{$_.key -eq ”vmware-vpxa“} | Restart-VMHostService
}
You could do something like this
Get-Content VMHostNames.txt | %{
Get-VmHostService -VMHost $_ | ?{$_.key -eq ”vmware-vpxa“} | Restart-VMHostService
}