Search This Blog

Wednesday, 15 April 2020

Getting Edges + Isolated networks from vCloud Director using powercli

A couple of simple snippets in order to get NSX-V edges and isolated network names from vCloud Director using Powercli. This is quite handy when upgrading NSX.
I assume you have VMware Powercli module installed in Powershell, and you are connected to the vCloud Director server with connect-ciserver command.


1) Getting edges and their organizations

In powershell:

$orgvdcs = get-orgnetwork
$edgesorgs = @()
foreach ($orgvdc in $orgvdcs) {
    $edges = $orgvdc.extensiondata.edgegateway
   
    foreach ($edge in $edges) {
        $edgeorg = "" | select Org,Edge
        $edgeorg.org = $orgvdc.org.name
        $edgeorg.edge = $edge.name

        $edgesorgs += $edgeorg
     }



2) Getting isolated network names

get-orgnetwork | where NetworkType -eq 'Isolated'

I hope it will be useful for you.
Nicolás

No comments:

Post a Comment

Thanks for your comment!