Forum Discussion
GTM control?
> Get-F5.iControlCommands
Add-F5.LTMPoolMember Add-F5.LTMVirtualServerRule Disable-F5.LTMNodeAddress Disable-F5.LTMPoolMember Disable-F5.LTMVirtualServer Download-F5.Configuration Download-F5.File Enable-F5.LTMNodeAddress Enable-F5.LTMPoolMember Enable-F5.LTMVirtualServer Get-F5.ConfigurationList Get-F5.DBVariable Get-F5.iControl Get-F5.iControlCommands Get-F5.LTMNodeAddress Get-F5.LTMPool Get-F5.LTMPoolMember Get-F5.LTMPoolMemberState Get-F5.LTMRAMCacheEntries Get-F5.LTMRule Get-F5.LTMVirtualServer Get-F5.LTMVirtualServerRule Get-F5.LTMVirtualServerStatistics Get-F5.ProductInformation Get-F5.SystemCPUUsage Get-F5.SystemDiskUsage Get-F5.SystemFanUsage Get-F5.SystemId Get-F5.SystemInformation Get-F5.SystemMemoryUsage Get-F5.SystemPowerUsage Get-F5.SystemTime Get-F5.SystemTimeZone Get-F5.SystemUptime Initialize-F5.iControl Load-F5.Configuration Move-F5.LTMPoolMember New-F5.SharePoint2007Deployment Remove-F5.Configuration Remove-F5.File Remove-F5.LTMPoolMember Remove-F5.LTMRAMCacheEntries Remove-F5.LTMVirtualServerRule Remove-F5.SharePoint2007Deployment Rollback-F5.Configuration Save-F5.Configuration Set-F5.DBVariable Set-F5.LTMPoolMemberState Upload-F5.Configuration Upload-F5.File
I can initialize a connection to the GTM and some of the basic and system commands work fine, but what I would like to use is something like Disable-F5.GTMPoolMember / Enable-F5.GTMPoolMember.
Is there currently a way to do this with the SnapIn? If not, are there any future plans to incorporate GTM commands?
-Ned
- Ned_66277
Nimbostratus
I dug a little bit, and found out this is the function I want to use: - Sorry for not posting sooner, I didn't have all my email alerts setup correctly for the new social groups. I wasn't ignoring you - I promise B-).
- Ned_66277
Nimbostratus
Specifically what I'd like to do is disable a particular GTM pool member in a script (and enable that same member in another script). Something like this (with the correct syntax of course): - As promised, here's a script that will query a GTM's Pools and Pool Members and allow you to get and set the state of the pool members. Let me know if you have any questions:
- Ned_66277
Nimbostratus
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
PS G:\PoSH\F5_iControl> ./GTMPoolMember.ps1 gtm1 admin ******* pool_sqlinstance3 10.1.2.70:0
PS G:\PoSH\F5_iControl> ./GTMPoolMember.ps1 gtm1 admin ******* pool_sqlinstance3 10.1.2.70:0 disable
PS G:\PoSH\F5_iControl> ./GTMPoolMember.ps1 gtm1 admin ******* pool_sqlinstance3 10.1.2.70:0 STATE_DISABLED
- That is odd. What version of PowerShell are you running? Type in $host.version in the powershell prompt. I'm testing this on v2.0. I just cut and pasted the sample in CodeShare and it worked fine.
- Ok, I've updated the script with more explicit type casting on the 1-d and 2-d array creation. Let me know if this works
- Now at least those make sense. I didn't provide mappings for the friendly states of "enabled" or "disabled". You need to use the true enumeration values of STATE_ENABLED or STATE_DISABLED on your command line.
- Ned_66277
Nimbostratus
Yes, it works! I am happy, thank you so much for your help! - Araiot_156251
Nimbostratus
Hi to All,
I was looking for examples on the commands but they are blank... so i got to ask how do i use the Save-F5.Configuration command, please provide an example. And what is [-Mode]
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