Forum Discussion
How to Modify iRule and apply new iRule through API.
Thanks so much for the info. Do you know how to use it ? Do I just need to use that single powellshell script "Set-iRule.ps1" or something else. ?
- JRahmDec 13, 2018
Admin
The usage information for the module is in the readme on Github. You need to establish your credentials, and then instantiate the BIG-IP.
$secpasswd = ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force $mycreds = New-Object System.Management.Automation.PSCredential "username", $secpasswd New-F5Session -LTMName "192.168.1.245" -LTMCredentials $mycredsThis of course assumes you are using basic auth instead of tokens.
- Mitesh_378646Dec 14, 2018
Nimbostratus
Thanks Tiziano & Jason for your help. Does that mean to set\update the iRule i just need to include 'Set-iRule.Ps1' or 'Get-iRule' in my TFS release task and execute it ?
Thanks Again for your help and pointing me to right direction.
- JRahmDec 14, 2018
Admin
Yes, after instantiation you should be able to just run the script. Note the credentials line in the Set-iRule.ps1 srcipt.
However, please note I'm not sure exactly about the mechanics of TFS as I'm unfamiliar with the platform.
- Mitesh_378646Dec 17, 2018
Nimbostratus
Thanks Jason for your guidance.
- Mitesh_378646Jan 10, 2019
Nimbostratus
Hi Jason, The powershell "Set-iRule.ps1" does take few input parameter one of which is RuleContent, but in my case iRules are already available on virtual server just that i need to apply any one of them ?
I dont want create iRules everytime,inshort just pick any one and apply.
- JRahmJan 11, 2019
Admin
The iRules attribute is not a subcollection, so any update needs to be the complete list of iRules you want applied to that virtual server.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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