Forum Discussion
PS script to display member states of all pools?
Does anyone know of or have a sample of a powershell script that will allow me to display the enabled/disabled state of ALL of the pools' members? We have many pools, and each has several members, and I'd like to be able to quickly see what's up and what's down.
I've searched the devcentral and don't see anything quite like this (I can report NUMBER of up/down (e.g. 2/3 or 0/3, etc.)) but I want to actually have the pool names listed and then the member's statuses under each.
MANY THANKS!
Dominic
3 Replies
- Tim_K_92675
Cirrostratus
I used this as a model for what I needed, similar to your needs: - corpkid_17486
Nimbostratus
Thanks Tim! I'm actually messing with that one right now. I'm trying to figure out how to enumerate all the pools and members automatically based off that script. All of the methods take arrays as parameters. So, let's say you want to get the object status for all members of all pools, you could do something like this:
$pool_list = (Get-F5.iControl).LocalLBPool.get_list();
The returned value in $MemberObjectAofA will be a 2-d Array. The first dimension associating with the pools. The second dimension would be the members for that given pool.
for($i=0; $i -lt $pool_list.Length; $i++)
Warning, this isn't tested, but it should be close...
Hope this helps!
-Joe
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