Forum Discussion
Zdenda
Cirrus
Oct 21, 2013Show members of Datagroup - PowerShell
Hi, I can't find the way to display members of Address datagroup. I am trying command like this:
$Class = (Get-F5.iControl).LocalLBClass
$Class.get_address_class_member($Class.get_address_class((,...
Oct 24, 2013
LocalLB.Class.get_address_class_member isn't a method in the API. Where did you find a reference to it? The call to get_address_class will return an array of structures containing the name and members for each class requested. Here's some code to get you started
$addressClassA = (Get-F5.iControl).LocalLBClass.get_address_class_list();
$ClassInfoA = (Get-F5.iControl).LocalLBClass.get_address_class($addressClassA);
foreach($class in $ClassInfoA) {
$name = $class.name;
Write-Host "Class: $name";
$members = $class.members;
foreach($member in $members) {
Write-Host " $member";
}
}Hope this helps...
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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