Hello Guys,
I used to get such requests from customers so I thought to share this one to web. Many of you might know this but I am sure that many will have benefit from this post.
My colleagues too requested to share this trick to get the edge gateway name which are connected to internet.
This sounds tricky but very simple. Try your thought before scroll down and comment :)
If not getting any idea then continue reading it. So, any edge gateway connected to internet through external network, right? and it has a name :) let's say in our case that name is InternetPG. I am assuming that you know the basic VCD stuff like what is the external network and how can we connect an edge gateway to the internet. If not then its time to start the study for the sake of new year. LOL!
Logic is, get the edge gateway name where connected external network name like InternetPG. Now, use this logic in powercli
Connect-CIServer mylabs.vcnotes.in #just to connect VCD
Get-EdgeGateway | Where {$_.ExtensionData.Configuration.GatewayInterfaces.GatewayInterface.name -clike "InternetPG"} | Select Name, orgvdc | out-gridview
I like to take output in gridview, if you want, you can remove out-gridview in above command. You will have output like below one.
Enjoy the year end guys!