Im working on automating the VIP creation process and need to create empty pools then add the members later. So Im not certain how to create empty pools using powershell. Thanks.
You can try passing in empty values for the lb method and members in the Pool.create() method but that may error out. If it does, you can pass a single bogus member in and then issue a Pool.remove_member() call taking that member out.
I dont think you can create your pools with invalid or blank entries; but you can create a vip without a pool… try this.
$vipDefs = new-object "iControl.CommonVirtualServerDefinition[]" 1
$vipDefs[0] = new-object "iControl.CommonVirtualServerDefinition"
$vipDefs[0].address = "0.0.0.0";
$vipDefs[0].name = $vipName
$vipDefs[0].port = 0;
$vipDefs[0].protocol = [iControl.CommonProtocolType]::PROTOCOL_ANY;
$wildmask = @("0.0.0.0")
$resources = new-object "iControl.LocalLBVirtualServerVirtualServerResource[]" 1
$resources[0] = new-object "iControl.LocalLBVirtualServerVirtualServerResource"
$resources[0].default_pool_name = ""
$resources[0].type = [iControl.LocalLBVirtualServerVirtualServerType]::RESOURCE_TYPE_IP_FORWARDING
$profiles = new-object "iControl.LocalLBVirtualServerVirtualServerProfile[][]" 1
$iControl.LocalLBVirtualServer.create($vipDefs, $wildmask, $resources, $profiles)