Forum Discussion
Powershell Change a Virtual Server Default Pool
Hi,
I am trying to change the Load Balancer default pool via Powershell. I try using get-F5 command but with no luck. Can someone please help me find the correct commands.
can you provide the commands you use now and the output?
- DeAndre_Deer_32
Nimbostratus
the command I am using is "$ActiveLB.LocalLBVirtualServer.set_default_pool_name('/Common/Test-Pool', '/Common/FL-External-Sitedow')". I gett the following error message Exception calling "set_default_pool_name" with "2" argument(s): "Exception caught in LocalLB::urn:iControl:LocalLB/VirtualServer::set_default_pool_name() Exception: Common::OperationFailed primary_error_code : 16908342 (0x01020036) secondary_error_code : 0 error_string : 01020036:3: The requested pool (/Common/FL-External-Sitedow) was not found." At C:\Users\ddeer\Downloads\Powershell_ActiveUnit-Test.ps1:28 char:2 + $ActiveLB.LocalLBVirtualServer.set_default_pool_name('/Common/Tes ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : SoapHeaderException
- Hygor
Nimbostratus
Can you confirm if the pool FL-External-Sitedow exists? As you can see, the log message shows you that the pool doesn't exist error_string : 01020036:3: The requested pool (/Common/FL-External-Sitedow) was not found."
Double check the pool name and correct the syntax.
from this example: http://techieespoint.in/f5-big-ip-automation-through-powershell/
they call it like this: $AuthObj.LocalLBVirtualServer.set_default_pool_name(“testvirtualserver”,$VIPPoolName)
which matches here: https://devcentral.f5.com/wiki/iControl.LocalLB__VirtualServer__set_default_pool_name.ashx
you first do the virtual server and then the pool, it is difficult to judge but /Common/Test-Pool feels like a poolname.
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