Hello, I was wondering if there is an easy way to get the IP addresses for the Virtual Adapters I have specified for management and vmotion when using distributed vswitches. I saw Luc's site where he created some dvswitch functions but was wondering if there was already a way to get this information?
In PowerCLI 4.1 the Get-VMHostNetworkAdapter cmdlet also returns info for portgroups on dvSwitches.
Get-VMHost <esxname> | Get-VMHostNetworkAdapter -Console:$true | Select VMHost,PortGroupName,IP
will show the IP addresses for all SC, also those on a dvSwitch.
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
In PowerCLI 4.1 the Get-VMHostNetworkAdapter cmdlet also returns info for portgroups on dvSwitches.
Get-VMHost <esxname> | Get-VMHostNetworkAdapter -Console:$true | Select VMHost,PortGroupName,IP
will show the IP addresses for all SC, also those on a dvSwitch.
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks Luc, however, when I run that command it does not return a value, even with the spelling fix on "PortGrioupName"
PS D:\Program Files\VMware\Infrastructure\vSphere PowerCLI> Get-VMHost ESXHOST | Get-VMHostNetworkAdapter -Console:$true | Select VMHost,PortGroupName,IP
PS D:\Program Files\VMware\Infrastructure\vSphere PowerCLI>
Oops, sorry for the typo. It's corrected.
Are you using PowerCLI 4.1 ?
Get-PowerCLIVersion
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Ah that's most likely the answer. I had PowerCLI 4.1 installed but forgot I had removed it because VESI ecoshell had some bugs with it... Cheers.