VMware Cloud Community
tdubb123
Expert
Expert

need to get vmdk, windows mount point and naaid info

I need to get the mout point info, naa id, vmdk info

$TotalGB = @{Name="Capacity(GB)";expression={[math]::round(($_.Capacity/1GB),2)}}

$FreeGB = @{Name="FreeSpace(GB)";expression={[math]::round(($_.FreeSpace/1GB),2)}}

$percentfree = @{Name="Free(%)";expression={[math]::round(((($_.FreeSpace /1GB)/($_.Capacity /1GB)) * 100),0)}}

#$vmdks = Get-VM -name (get-content .\vms.txt) | Get-HardDisk

$volumes = Get-WmiObject -computer $server win32_volume | Where-object {$_.DriveLetter -eq $null} | Select SystemName, Label, $TotalGB, $FreeGB, $percentfree | Format-Table -AutoSize

$servers = (Get-Content "c:\scripts\vms.txt")

foreach ($server in $servers){

$volumes | ft -AutoSize

}

how do I add the vmdk/naa id info into this?

Thanks

Reply
0 Kudos
1 Reply
LucD
Leadership
Leadership

There is currently no fool-proof method to link VMDK to OS guest partitions and drives.

There have been many threads in this community about the subject, but none could deliver a method that would work in all cases.


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

Reply
0 Kudos