hi!
I am writing a script to get the IP address and subnet mask for a VMkernel port (NFS ports for storage connectivity) for our host servers, to save their config prior to upgrading to v4.1. the script is almost done but I'm having difficulties with some parts of my script. For example:
#get the NFS VMkernel port IP address details for each host
$NFSportgroups = Get-VirtualPortGroup -vmhost $hostsvr | Where {$_.name -match "nfs-"} # our NFS port names are preceeded with "nfs-"
foreach ($pg in $NFSportgroups)
{
$NFSip = ??
$NFSsubnet = ??
}
Similarly, I'm having difficulties getting a host server IP, subnet, gateway and VMotion IP for ESXi4 hosts - my script works fine for ESX3.5 hosts, so please provide assistance with the code I need for this too!
thanking you in advance!
Ross