For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Martin_B__246_r's avatar
Martin_B__246_r
Icon for Nimbostratus rankNimbostratus
Oct 20, 2015

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

  • 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.