Forum Discussion

Adam_Aronow_842's avatar
Icon for Nimbostratus rankNimbostratus
Oct 04, 2011

modifying data group with PowerShell

Hi. I have a Data Group set up with some string records in BIG-IP version 10.0.1. I'm trying to modify the existing records using PowerShell, but I can't figure out the syntax.



The entries look like this:




basemessage|A stock message


additionalmessage|An optional message



The value of the "additionalmessage" entry will change frequently.



What commands can I use to
  1. Toggle the first entry to "available|false"
  2. Change the value of the "additionalmessage" entry, without having to know its present value



    I tried using an external file with key-value pairs, but I couldn't get that to work.



    I am relatively new to F5 configuration, and only a dabbler in PowerShell. I'm much better with VBScript, but unfortunately that won't work for this purpose.

2 Replies

  • Addendum: I'd also be open to using Python.



    What I'm trying to accomplish is to have an easily-scriptable way to tell an iRule to display a "site not available" maintenance page, with an optional message about the length or cause of the outage.



    I might have to resort to using a Bash script running on the F5 itself, and script calling it through PuTTY. But that's not really my first choice.
  • Hi Adam,



    Better late than never? Here's a related post and article for handling data groups using PowerShell and iControl: