Forum Discussion
2 Replies
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
- M_125189NimbostratusYes there was a code in Perl but i was looking for the PS one. Thank you so much.