Forum Discussion

sriramgd_111845's avatar
sriramgd_111845
Icon for Nimbostratus rankNimbostratus
May 21, 2010

(Get-F5.iControl).LocalLBVirtualServer.add_rule

I want to use (Get-F5.iControl).LocalLBVirtualServer.add_rule to add a irule to a virtual server.

 

 

The method signature is:

 

{System.Void add_rule(String[] virtual_servers, LocalLBVirtualServerVirtualServerRule[][] rules)}

 

 

The problem is the second parameter. How do I put my rule into a 2 dimensional array of type LocalLBVirtualServerVirtualServerRule and pass it to the method?

 

2 Replies

  • To add to that, I have already added the rule to the F5 using:

     

    (Get-F5.iControl).LocalLBRule.Create($ruleDef)

     

     

    Is there any method to just add this rule to a virtual server by rulename?

     

  • Here's a tech tip I wrote a while back covering iRules with PowerShell. This should give you all the info you need.

     

     

    http://devcentral.f5.com/Default.aspx?tabid=63&articleType=ArticleView&articleId=185

     

     

    -Joe