简体   繁体   中英

How can I get only the currentVersion from PowerCLI?

I'm trying to obtain only the latest version number

For example: ESXi 6.0 Update 2

This is what I have done:

$esxitest = Get-VMHost esxitest.test.local | Get-VMHostLatestVersion

Write-Host "Version:" $esxitest

Expand the Version property of the returned object:

$esxitest = Get-VMHost esxitest.test.local |
            Get-VMHostLatestVersion |
            Select-Object -Expand Version

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM