Forum Discussion
Richard_Milner-
Aug 15, 2012Nimbostratus
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