Forum Discussion
Jul 06, 2016
Here's how you can get the destination addresses of all virtuals
$VSList = (Get-F5.iControl).LocalLBVirtualServer.get_list();
$AddressPortList = (Get-F5.iControl).LocalLBVirtualServer.get_destination_v2($VSList);
for($i=0; $i -lt $AddressPortList.length; $i++) {
$virtual = $VSList[$i];
$vaddr = $AddressPortList[$i].address;
$vport = $AddressPortList[$i].port;
Write-Host "Virtual ${virtual} -> ${vaddr}:${vport}"
}
This was written without testing to I apologize in advance for any typos...
For future reference, I've put together a lot of PowerShell articles and samples that are listed in the iControl Wiki at https://devcentral.f5.com/wiki/iControl.PowerShell.ashx
Hope this helps!
-Joe