So am I ok in doing this
1) place plink.exe on my local drive
2) ensure sudo is installed on all hosts
run this script form VI toolkit
********************************************************************************************************
$vcserver = "";
*
Connect-VIServer $vcserver
*
$User = <ESX-account>
$Pswd = <ESX-account-password>
$plink = "<path to >\plink.exe"
$plinkoptions = " -v -batch -pw $Pswd"
ForEach ($VMHosts in Get-VMHost | Sort Name)
{
$cmd1 = 'sudo -u root cat /etc/vmware/esx.conf'
$remoteCommand = '"' + $cmd1 + '"'
$command = $plink + " " + $plinkoptions + " " + $User + "@" + $VMHosts + " " + $remoteCommand
$msg = Invoke-Expression -command $command
$msg | Set-Content "C:\Temp\$VMHosts"
}
*
disconnect-viserver -confirm:$false
*
P/S output files needs to be zipped