VMware Cloud Community
gman7777
Contributor
Contributor
Jump to solution

OpenSSL Powershell script

does anyone have a PowerCLI script to get the OpenSSL version for each host on a Virtual Center

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Then I suggest you try plink.exe from the PuTTY suite

Once the SSH is open, just execute the same command as I gave above.

Alan has some tips on the use of plink.exe


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

View solution in original post

Reply
0 Kudos
9 Replies
LucD
Leadership
Leadership
Jump to solution

Try something like this (it assumes all VMs have the VMware Tools installed).

$script = 'openssl version -v'

$user = 'root'

$pswd = 'password'

Get-VM | where {$_.GuestId -match "rhel|sles"} |

Select Name,@{N='OpenSSL';E={

  Invoke-VMScript -VM $_ -ScriptType Bash -ScriptText $script -GuestUser $user -GuestPassword $pswd

}}


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

Reply
0 Kudos
gman7777
Contributor
Contributor
Jump to solution

Hi Luc,

Thanks for the response, but this would check VMGuests, I need to check the version on the host

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

To clarify, you mean the ESXi nodes ?


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

Reply
0 Kudos
gman7777
Contributor
Contributor
Jump to solution

Hi Luc,

Sorry, , yes the ESXi nodes.

Thank You

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Are you allowed to set up a SSH session to your ESXi nodes ?


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

Reply
0 Kudos
gman7777
Contributor
Contributor
Jump to solution

Yes we have it enabled, so there is no issue

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Then I suggest you try plink.exe from the PuTTY suite

Once the SSH is open, just execute the same command as I gave above.

Alan has some tips on the use of plink.exe


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

Reply
0 Kudos
gman7777
Contributor
Contributor
Jump to solution

Thanks much Luc,

Will do

Reply
0 Kudos
gman7777
Contributor
Contributor
Jump to solution

This has been answered. Thank You

Reply
0 Kudos