Forum Discussion
Get virtual server default pool from PowerShell iControl?
Is there any way to get a virtual server default pool through the iControl Powershell snapin? What I would like to do using the PowerShell spanin and cmdlets is get a list of virtual servers, get the pools they are associated with, and then get a list of nodes in that pool. I want to get all that information along with status and present it in a chart.
Get-F5.LTMPoolMember already ties each node to a pool, but I can't find a way to tie the virtual servers to the pools. Get-F5.LTMVirtualServer only has 3 properties; name, availability, and enabled status.
I can't help with the powershell aspect, but the iControl call you want is LocalLB::VirtualServer::get_default_pool_name. There are some powershell examples on the page for that at
https://devcentral.f5.com/wiki/iControl.LocalLB__VirtualServer__get_default_pool_name.ashx
that might help you out.
4 Replies
- mimlo_61970
Cumulonimbus
I can't help with the powershell aspect, but the iControl call you want is LocalLB::VirtualServer::get_default_pool_name. There are some powershell examples on the page for that at
https://devcentral.f5.com/wiki/iControl.LocalLB__VirtualServer__get_default_pool_name.ashx
that might help you out.
- tickermcse76_16
Nimbostratus
Thanks. I just started using the F5 Powershell cmdlets and they don't offer too much. You have to essentially use iControl to get anything done (by utilizing the Get-F5.iControl cmdlet). - tickermcse76, I originally wrote the cmdlets to fill out some use cases but I was quickly told by users that they didn't fill "their" use cases. I originally built in the core iControl.Interfaces object from the underlying .Net Assembly that could be accessed by the Get-F5.iControl() cmdlet. Since that covered 100% of the API, we focused on urging users to go that route.
You have some of the functionality here:
https://devcentral.f5.com/wiki/iControl.Powershell-BigIP-Report-Generator.ashx
It scans irules for pool definitions and gets the default pool. Feel free to copy. :)
/Patrik
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