Forum Discussion
Richard_Milner-
Aug 14, 2012Nimbostratus
Creating Profiles / available methods list on iControl?
Hi Folks, I suspect I've just missed a large chunk of the documentation, so any pointers would be handy... I've already used iControl briefly in a couple of other tools, mainly...
Aug 15, 2012
Posted By Richard Milner-Watts on 08/15/2012 06:16 AM
Anyone have any thoughts on why the following isn't working? No errors are thrown, yet it doesn't change the value for insert_xforwarded_for_header_mode.
$ProfileMode = New-Object -TypeName iControl.LocalLBProfileProfileMode;
$ProfileMode.value = "PROFILE_MODE_ENABLED";
$ProfileMode.default_flag = "False";
$ProfileModes = (, $ProfileMode);
(Get-F5.iControl).LocalLBProfileHttp.set_insert_xforwarded_for_header_mode( "test_http_profile", $ProfileModes )
(Get-F5.iControl).LocalLBProfileHttp.get_insert_xforwarded_for_header_mode( "test_http_profile" )
EDIT: I fixed it myself, spend two hours playing with this and then find a solution 2 minutes after I post... typical.
If I don't set default_flag to anything (true or false) then the code works. It's not obvious from the documentation but I'm guessing this is a system flag that I'm not meant to set myself, i.e. I can use it too tell whether the value is inherited but not to control inheritence??
<< A little confused
Try setting the value of default_flag to the native true/false values in Powershell ($True, or $False). Or you could set it to 1 for true, or 0 for false. default_flag is of type "boolean" so I'm actually surprised it let you assign it a string.
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