A few useful VI Toolkit commands I have found / modified.
Get all Service Console IPs
Get-VMHost | where {$_.State -eq “Connected”} | Get-View | `
%{$esxName = $_.Name; Get-View -Id $_.ConfigManager.NetworkSystem} | `
%{$_.NetworkInfo.ConsoleVnic} | `
%{Write-Host $esxName $_.Portgroup $_.Spec.Ip.IpAddress}
Get all VMKernel IPs
Get-VMHost | where {$_.State -eq “Connected”} | Get-View | `
%{$esxName = $_.Name; Get-View -Id $_.ConfigManager.NetworkSystem} | `
%{$_.NetworkInfo.Vnic} | `
%{Write-Host $esxName $_.Portgroup $_.Spec.Ip.IpAddress}
Get VM Free Disk Space
Connect-VIServer cw-vc
Get-VM | Where { $_.PowerState -eq “PoweredOn” } | Get-VMGuest | Select VmName -ExpandProperty disks | Select VmName, Path, @{ N=”PercFree”; E={ [math]::Round( (100 * ( $_.FreeSpace / $_.Capacity ) ),0 ) } } | Sort PercFree