Forum Discussion
add/remove poolmembers
I've got lots of example scripts but can't believe I don't have one in the CodeShare for adding/removing members.
You could try something like this
Create member (v11+). Used add_member() pre v11.
$pool_list = @("pool_name");
$AddrPort1 = New-Object -TypeName iControl.CommonAddressPort;
$AddrPort1.address = "10.10.10.10";
$AddrPort1.port = 80;
$AddrPort2 = New-Object -TypeName iControl.CommonAddressPort;
$AddrPort2.address = "10.10.10.10";
$AddrPort2.port = 80;
$AddrPortA = @($AddrPort1, $AddrPort2);
$AddrPortAofA = @($AddrPortA);
$ic = (Get-F5.iControl).LocalLBPool.add_member_v2($pool_list, $AddrPortAofA);
Delete Member
$ic = (Get-F5.iControl).LocalLBPool.remove_member_v2($pool_list, $AddrPortAofA);
I didn't test this so hopefully it avoids any sytax errors...
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com