PowerCLI

 View Only
  • 1.  OpenSSL Powershell script

    Posted Feb 24, 2015 10:01 PM

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



  • 2.  RE: OpenSSL Powershell script

    Posted Feb 24, 2015 10:36 PM

    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

    }}



  • 3.  RE: OpenSSL Powershell script

    Posted Feb 24, 2015 10:52 PM

    Hi Luc,

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



  • 4.  RE: OpenSSL Powershell script

    Posted Feb 25, 2015 06:20 AM

    To clarify, you mean the ESXi nodes ?



  • 5.  RE: OpenSSL Powershell script

    Posted Feb 25, 2015 03:22 PM

    Hi Luc,

    Sorry, , yes the ESXi nodes.

    Thank You



  • 6.  RE: OpenSSL Powershell script

    Posted Feb 25, 2015 04:59 PM

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



  • 7.  RE: OpenSSL Powershell script

    Posted Feb 25, 2015 05:02 PM

    Yes we have it enabled, so there is no issue



  • 8.  RE: OpenSSL Powershell script
    Best Answer

    Posted Feb 25, 2015 08:17 PM

    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



  • 9.  RE: OpenSSL Powershell script

    Posted Feb 25, 2015 08:22 PM

    Thanks much Luc,

    Will do



  • 10.  RE: OpenSSL Powershell script

    Posted Feb 25, 2015 08:22 PM

    This has been answered. Thank You