Forum Discussion
kelemvor_50002
Nimbostratus
Jul 12, 2013Can 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?
Jul 12, 2013
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
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects