Here is the scenario. I use neterion 10GB adapters in my esx host and they use the S2IO driver. However, there are different version of this driver that have been released as a result of ESX updating. For example, there is a different driver version for ESX 3.5 U1, U2, U3, U4....... I can easy get this version # by logging into the console and executing the ethtool -i <vmnic#>. I will get a result like this:
driver: s2io
version: 2.2.14.17590
firmware-version:
bus-info: 11:04.0
The number I am concerned about is the 2.2.14.17590. On a one by one basis using the ethtool command is not such a bad way to go. However,
to do this on a couple hundred ESX host is a very time consuming activity. I would like to be able to somehow get a report that has the ESX host Name with the driver and driver version next to it. Does know how to get this information using powershell commands?
The only way I know how to automate this is through the use of the plink.exe command.
Something like this
$User = <account> $Pswd = <password> $regexMask = [regex]"version:\s+([\w|http://.]+)" $Computer = <esx-hostname> $plink = "<PuTTY-directory>\plink.exe" $plinkoptions = " -v -batch -pw $Pswd" $cmd1 = 'ethtool -i vmnic0' $remoteCommand = '"' + $cmd1 + '"' $command = $plink + " " + $plinkoptions + " " + $User + "@" + $computer + " " + $remoteCommand $msg = Invoke-Expression -command $command $driverVersion = $regexMask.Match($msg).Groups[1].Value $driverVersion
I attached the script since the forum SW has some problems with square brackets.
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
The only way I know how to automate this is through the use of the plink.exe command.
Something like this
$User = <account> $Pswd = <password> $regexMask = [regex]"version:\s+([\w|http://.]+)" $Computer = <esx-hostname> $plink = "<PuTTY-directory>\plink.exe" $plinkoptions = " -v -batch -pw $Pswd" $cmd1 = 'ethtool -i vmnic0' $remoteCommand = '"' + $cmd1 + '"' $command = $plink + " " + $plinkoptions + " " + $User + "@" + $computer + " " + $remoteCommand $msg = Invoke-Expression -command $command $driverVersion = $regexMask.Match($msg).Groups[1].Value $driverVersion
I attached the script since the forum SW has some problems with square brackets.
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference