Forum Discussion
ps Get-f5.LTMvirtualserverrule
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
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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