Hello
Is it possible with Powersehell Vmware.VimAutomation.Cloud where i can connect to a VDC and then list all the Networks (VLAN's).
Then list all each VLAN with the VM within it ?
$vcd01="https://vcd01.abc.com"
$orgPol="s01_I_a02"
$orgvdcPolSQL="s01_I_a02_SQL"
# I connect to the CIServer
Connect-CIServer -Server $vcd01 -org $orgPol -User $script:CloudUser -Password $script:password
#Gets all visible networks within an organization.
$myOrg = Get-Org -Name $orgPol
Get-OrgNetwork -Org $myOrg | FT -AutoSize
The output is
Name Gateway Org ExternalNetwork NetworkType
---- ------- --- --------------- -----------
External_abc-ProdIntrnlApp-2614 10.255.193.1 s01_I_a02 External_a02_abc-ProdInternalApp-10.255.193.0/24 Direct
External_abc-ProdApp-2613 10.255.192.1 s01_I_a02 External_a02_abc-ProdApp-10.255.192.0/24 Direct
How can I list all the VM's from each VLAN ?
The reason for this is we need to move servers from one VLAN to another and set it as DHCP. The work above will be use to check the work.
Produce the VMs from within each VLAN showing the VM,Network VLAN,IP address , Manual or static.
Once we make the move then we will re-done it so that we can see that they have been moved .