VMware Cloud Community
houghtp
Contributor
Contributor
Jump to solution

Host Firmware

Hi,

Is there a way to get ESX 3.5 host firmware levels with PowerCli?

thanks

Paul

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Afaik this information is not available through any of the PowerCLI cmdlets nor through the APIs.

What you could do is to use the plink.exe command and launch a command in the COS that returns this kind of information.

The following script shows for example how to launch the dmesg command in the COS and captures the output in a PowerShell variable.

$User = <ESX-account>
$Pswd = <ESX-password>
$Computer = <ESX-hostname>
$plink = "<Putty directory>\plink.exe"
$plinkoptions = " -v -batch -pw $Pswd"
$cmd1 = 'sudo -u root /bin/dmesg'

$remoteCommand = '"' + $cmd1 + '"'
$command = $plink + " " + $plinkoptions + " " + $User + "@" + $computer + " " + $remoteCommand

$msg = Invoke-Expression -command $command 

# Extract the required info from the $msg variable
...

Of course you need to set up sudo in the COS correctly to be able to do this!


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
4 Replies
LucD
Leadership
Leadership
Jump to solution

What exactly do you mean with "firmware level" ?

Firmware level is something I know for ESXi.

Or do you mean the build version of ESX ?

Is it shown in the VIC ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
houghtp
Contributor
Contributor
Jump to solution

sorry, i mean things like ROM, NIC, Array controller...

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Afaik this information is not available through any of the PowerCLI cmdlets nor through the APIs.

What you could do is to use the plink.exe command and launch a command in the COS that returns this kind of information.

The following script shows for example how to launch the dmesg command in the COS and captures the output in a PowerShell variable.

$User = <ESX-account>
$Pswd = <ESX-password>
$Computer = <ESX-hostname>
$plink = "<Putty directory>\plink.exe"
$plinkoptions = " -v -batch -pw $Pswd"
$cmd1 = 'sudo -u root /bin/dmesg'

$remoteCommand = '"' + $cmd1 + '"'
$command = $plink + " " + $plinkoptions + " " + $User + "@" + $computer + " " + $remoteCommand

$msg = Invoke-Expression -command $command 

# Extract the required info from the $msg variable
...

Of course you need to set up sudo in the COS correctly to be able to do this!


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
houghtp
Contributor
Contributor
Jump to solution

Ok cheers Luc thought it was a long shot but that will get me what I need.

0 Kudos