Forum Discussion

spencero_196690's avatar
spencero_196690
Icon for Nimbostratus rankNimbostratus
Nov 12, 2016

How can I create member with name using powershell cmdlet?

How can you create pool members with descriptive names?

When I create a new vm, I'm able to automatically add it to a pool.

Add-F5.LTMPoolMember -Pool $PoolName -Member "${VMIP}:${Port}"

However the name of the node is its ip address.

I've also tried using the more low level way of adding a node

$PoolList = @($PoolName)
$Node = New-Object -TypeName iControl.CommonAddressPort;
$Node.address = $VMIP
$Node.port = $Port
(Get-F5.iControl).LocalLBPool.add_member_v2($PoolList, $Node)

I can't find any way to change the node name with

add_member_v2

2 Replies

  • Finally figured it out. Creating a node is done through LocalLBNoeAddressV2

    (get-f5.icontrol).LocalLbNodeAddressV2.create('herpderp','192.0.2.0', 0)
    

    Where 'herpderp' is the name of the node

    192.0.2.0 is the ip of the node

    0 is the maximum number of connections (0=default)