VMware Cloud Community
denjoh44
Enthusiast
Enthusiast

name vlan on each vlan of a cluster

hello

i must know if the vlan on each esx of a cluster, if the name is correct.

so i would like each name of vlan of my interrogation, containt a caracter before and after

exemple:

name vlan --> "0120-prd " -> a0120-prda

if the name vlan containt a blank before  " 0120-prd" --> a 0120-prda

have you a good command powercli to realise my demand

i have the name of virtuel center and the name of the cluster

thank you

Reply
0 Kudos
1 Reply
LucD
Leadership
Leadership

This will get you all the portgroups in the cluster (together with the VLanId) you can do something like

Get-Cluster -Name MyCluster | Get-VMHost |

Get-VirtualPortGroup | Sort-Object -Property Name -Unique |

Select Name,VLanId

I'm not sure what you mean with the character before an after part of the question.

Perhaps you could give an example or a screenshot ?


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

Reply
0 Kudos