Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

Icontrol snapin script add-f5.ltmvirtualserverrule

heskez_36146
Nimbostratus
Nimbostratus

Hi, I was looking for an easy way to quick apply an Irule to a bunch of virtual servers, this is eventually being used to publish a maintenance page on a couple of websites.

 

So I foooled around with Icontrol a little bit and powershell F5 snapin. Now I'm looking for a script/oneliner which is able to put an Irule on a VS and remove it afterwards.

 

I tried this way :

 

ps > add-f5.ltmvirtualserverrule /Common/Irule -virtualserver /Common/Virtualserver

 

Which produces an error message: Cannot bind parameter 'Virtualserveritem' etc

 

So it looks like this cmdlet isn't suitable for a oneliner perhaps.

 

I found out (using Devcentral search) that the F5 management pack provides you with a cmdlet Register-LTMiRule, this would be perfect, however this cmdlet isn't available within the Icontrol package...

 

I'm not much of a powershell scripter so is there a oneliner/script available for this kind of purpose?

 

Best, E

 

3 REPLIES 3

heskez_36146
Nimbostratus
Nimbostratus

This is a ready-to-use cmdlet, so there must be some kind of explanation how this thing works right?

 

heskez_36146
Nimbostratus
Nimbostratus

Nobody willing to head me the right direction?

 

Joe_Pruitt
Cirrostratus
Cirrostratus

Maybe not a one liner, but you should be able to use the Get-F5.iControl cmdlet to assign the virtual to the rule. I wrote a tech tip on using the iControl rules methods here: https://devcentral.f5.com/articles/icontrol-101-09-irules

 

There is a section on how to create and apply rules to a virtual.

 

If you are using PowerShell, I'd check out the PowerShell page in the iControl wiki where there are bunch of samples and articles to reference.

 

Hope this helps...

 

-Joe