Forum Discussion
LocalLB::VirtualServer::get_related_rule
Hi, I´m a bit tired today, so i need some help.
In powershell, im trying to list rules for a specific Virtual Server. I looked at "LocalLB::VirtualServer::get_related_rule" in the wiki and it says; "Gets the lists of related rules the specified virtual servers are associated with. If a specified virtual server is not associated with any rule, then the list of rules for that virtual server will be empty"
My command returns nothing. I can see in web gui that this vip has an rule.
if ((Get-PSSnapin | Where-Object { $_.Name -eq "iControlSnapIn" }) -eq $null)
{
Add-PSSnapIn iControlSnapIn
}
Initialize-F5.iControl -HostName "xxx" -User "xxx" -Password "xxx"
$f5 = Get-F5.iControl
$f5.LocalLBVirtualServer.get_related_rule('name_of_virtual_server')
Thanks!
Regards Martin
1 Reply
- JRahm
Admin
For a specific virtual server, you want the get_rule method, as that will give you the listing of all the iRules attached to that virtual server. Even after reading the wiki entry I'm still unclear what a related iRule is so I've asked for clarification from product development. I'll post when I hear back from them.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
* 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