VMware Cloud Community
vishu_dear05
Contributor
Contributor

PowerCli to list ESXi install locations for 7.0

https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Esxi-OS-running-on-Local-Sata-HDD-or-S...   This script works well with ESxi 6.7 
Is there a version for ESxi 7.0 avaialble .. In Our environment - ESXi is installed on SD Card and ESXOSData volume is on local disk  - may be why this script lists the ESXI installed on local disk instead of SD Card

Reply
0 Kudos
1 Reply
LucD
Leadership
Leadership

Does this list the correct device?
Note that it lists the boot device, not necessarily the ESX-OSData partition.

Get-VMHost |
ForEach-Object -Process {
    $esxcli = Get-EsxCli -VMHost $_ -V2
    $esxcli.storage.core.device.list.Invoke() |
        where{$_.IsBootDevice -eq 'true'} |
    Select @{N='VMHost';E={$esxcli.VMHost.Name}},IsUsb,Device,DisplayName
}


 


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

Reply
0 Kudos