Forum Discussion
Jeffrey_Silver1
Feb 28, 2014Nimbostratus
Patrik, the issue seems to be that even if you put the proper newline characters in the actual text, when you assign that text to the object the newline or carriage returns are not recognized. The irule in the code below gets created but when you go into the web interface and view the irule, all of the content is on a single line.
$data = Get-Content $invar1
$RuleDefinition = New-Object -TypeName iControl.LocalLBRuleRuleDefinition
$RuleDefinition.rule_name = $rule
**$RuleDefinition.rule_definition = $data**
$ic.LocalLBRule.create( (,$RuleDefinition) )