Forum Discussion
Can I change the default pool for a virt via Powershell?
Pretty self explanatory. I have virts and pools and just want to change one virt to point to a different pool via Powershell. What's the easiest way to do that?
2 Replies
The pool is an attribute on the Virtual server. To set the default pool, just use the LocalLB.VirtualServer.set_default_pool_name() method.
https://devcentral.f5.com/wiki/iCon..._name.ashx
There's a perl sample in the CodeShare that uses that method.
https://devcentral.f5.com/wiki/iCon...tPool.ashx
For the PowerShell snapin, to set the virtual "virtual_name" default pool to "pool_name", do something like this:
PS> Initialize-F5.iControl -hostname bigip_addr -username user -password pass
PS> $ic = Get-F5.iControl
PS> $ic.LocalLBVirtualServer.set_default_pool_name( @("virtual_name"), @("pool_name"))Hope this helps...
-Joe
- kelemvor_50002
Nimbostratus
I'll give it a try and see what I get. :)
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