Forum Discussion
M_125189
Nimbostratus
Feb 28, 2013ps Get-f5.LTMvirtualserverrule
Hi,
I am trying to see what are my irules attache to my Virtual server. When I run get-f5.LTMRule It returns all my iRules in my LTM.But when I'm trying to run get-f5.LTMvirtualserverrule -virtu...
Mar 01, 2013
Ok, that cmdlet wasn't built with support for the priorites. Just in case you didn't know, there's a cmdlet named Get-F5.iControl that returns you a list of all the native interfaces and their methods. Look at the Create-iRule() function in the above sample. Here's a stripped down version of that function without any error checking.
function Create-iRule()
{
param([string]$virtual, [string]$rule_name, [int]$priority);
Create Parameters
$virtual_servers = @($virtual);
$rule = New-Object -TypeName iControl.LocalLBVirtualServerVirtualServerRule;
$rule.rule_name = $rule_name;
$rule.priority = $priority;
$rules = @($rule);
(Get-F5.iControl).LocalLBVirtualServer.add_rule(
$virtual_servers,
$rules
);
}
Not sure how you initialized the CmdLet you were using but you may have to make a call to Initialize-F5.iControl before doing this.
Hope this helps...
-Joe
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