Hank_Stallings
Jun 19, 2015Nimbostratus
iControl SNAT Pool list vs Web interface
I am trying to list the SNAT pools on an LTM via iControl and the list of pools is different from the SNAT Pool List on the BIG-IP web interface.
I am using the following code:
$user = 'myuser'
$password = 'mypass'
$F5 = 'MyF5'
-------------------------------------------------------------------------
function Do-Initialize()
-------------------------------------------------------------------------
{
if ( (Get-PSSnapin | Where-Object { $_.Name -eq "iControlSnapIn"}) -eq $null )
{
Add-PSSnapIn iControlSnapIn
}
$success = Initialize-F5.iControl -HostName $F5 -Username $User -Password $password;
}
$SNATPools = (Get-F5.iControl).LocalLBSNATPool.get_list() -replace '/Common/',''
ForEach($pool in $SNATPools){
$poolmembers = (Get-F5.iControl).LocalLBSNATPool.get_member($pool)
ForEach($member in $poolmembers){
"$pool," + ($member -join ",")
}
}
This provides 2 SNAT Pools.
The web interface lists 30 and they don't include the two that come back from the PowerShell script.
I know I must be missing something, but I can't determine what I'm not doing right.
Thanks in advance!
Hank