Forum Discussion
GTM control?
Joe, thank you very much for your reply and code. I tried using this a few different ways but it doesn't want to work for me. Am I calling this incorrectly?
PS G:\PoSH\F5_iControl> ./GTMPoolMember.ps1 gtm1 admin ******* pool_sqlinstance3
Pool 'pool_sqlinstance3' Members
10.1.2.70:0
10.1.100.70:0
PS G:\PoSH\F5_iControl> ./GTMPoolMember.ps1 gtm1 admin ******* pool_sqlinstance3 10.1.2.70:0
Cannot convert argument "1", with value: "System.Object[]", for "get_enabled_state" to type "iControl.CommonIPPortDefin
ition[][]": "Cannot convert "System.Object[]" to "iControl.CommonIPPortDefinition[]"."
At G:\PoSH\F5_iControl\GTMPoolMember.ps1:88 char:77
+ $EnabledStateAofA = (Get-F5.iControl).GlobalLBPoolMember.get_enabled_state( <<<< $PoolA, $MembersAofA)
The variable $EnabledStateAofA cannot be retrieved because it has not been set yet.
At G:\PoSH\F5_iControl\GTMPoolMember.ps1:89 char:37
+ $EnabledStateA = $EnabledStateAofA[ <<<< 0];
Pool 'pool_sqlinstance3' member states
The variable $EnabledStateA cannot be retrieved because it has not been set yet.
At G:\PoSH\F5_iControl\GTMPoolMember.ps1:92 char:42
+ foreach($EnabledState in $EnabledStateA) <<<<
PS G:\PoSH\F5_iControl> ./GTMPoolMember.ps1 gtm1 admin ******* pool_sqlinstance3 10.1.2.70:0 disable
Exception setting "state": "Cannot convert value "disable" to type "iControl.CommonEnabledState" due to invalid enumeration values. Specify one of the following enumeration values and try again. The possible enumeration values are "STATE_DISABLED, STATE_ENABLED"."
At G:\PoSH\F5_iControl\GTMPoolMember.ps1:114 char:23
+ $MemberEnabledState.s <<<< tate = $State;
Cannot convert argument "1", with value: "System.Object[]", for "set_enabled_state" to type "iControl.GlobalLBPoolMemberMemberEnabledState[][]": "Cannot convert "System.Object[]" to "iControl.GlobalLBPoolMemberMemberEnabledState[]"."
At G:\PoSH\F5_iControl\GTMPoolMember.ps1:117 char:57
+ (Get-F5.iControl).GlobalLBPoolMember.set_enabled_state( <<<< $PoolA, $MemberEnabledStateAofA);
Cannot convert argument "1", with value: "System.Object[]", for "get_enabled_state" to type "iControl.CommonIPPortDefinition[][]": "Cannot convert "System.Object[]" to "iControl.CommonIPPortDefinition[]"."
At G:\PoSH\F5_iControl\GTMPoolMember.ps1:88 char:77
+ $EnabledStateAofA = (Get-F5.iControl).GlobalLBPoolMember.get_enabled_state( <<<< $PoolA, $MembersAofA)
The variable $EnabledStateAofA cannot be retrieved because it has not been set yet.
At G:\PoSH\F5_iControl\GTMPoolMember.ps1:89 char:37
+ $EnabledStateA = $EnabledStateAofA[ <<<< 0];
Pool 'pool_sqlinstance3' member states
The variable $EnabledStateA cannot be retrieved because it has not been set yet.
At G:\PoSH\F5_iControl\GTMPoolMember.ps1:92 char:42
+ foreach($EnabledState in $EnabledStateA) <<<<
PS G:\PoSH\F5_iControl> ./GTMPoolMember.ps1 gtm1 admin ******* pool_sqlinstance3 10.1.2.70:0 STATE_DISABLED
Cannot convert argument "1", with value: "System.Object[]", for "set_enabled_state" to type "iControl.GlobalLBPoolMemberMemberEnabledState[][]": "Cannot convert "System.Object[]" to "iControl.GlobalLBPoolMemberMemberEnabledState[]"."
At G:\PoSH\F5_iControl\GTMPoolMember.ps1:117 char:57
+ (Get-F5.iControl).GlobalLBPoolMember.set_enabled_state( <<<< $PoolA, $MemberEnabledStateAofA);
Cannot convert argument "1", with value: "System.Object[]", for "get_enabled_state" to type "iControl.CommonIPPortDefin
ition[][]": "Cannot convert "System.Object[]" to "iControl.CommonIPPortDefinition[]"."
At G:\PoSH\F5_iControl\GTMPoolMember.ps1:88 char:77
+ $EnabledStateAofA = (Get-F5.iControl).GlobalLBPoolMember.get_enabled_state( <<<< $PoolA, $MembersAofA)
The variable $EnabledStateAofA cannot be retrieved because it has not been set yet.
At G:\PoSH\F5_iControl\GTMPoolMember.ps1:89 char:37
+ $EnabledStateA = $EnabledStateAofA[ <<<< 0];
Pool 'pool_sqlinstance3' member states
The variable $EnabledStateA cannot be retrieved because it has not been set yet.
At G:\PoSH\F5_iControl\GTMPoolMember.ps1:92 char:42
+ foreach($EnabledState in $EnabledStateA) <<<<
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