# irule enabling and disabling via bash or cli or powershell

**URL:** <https://community.f5.com/t/irule-enabling-and-disabling-via-bash-or-cli-or-powershell/54578>\
**Category:** Technical Forums\
**Tags:** irules, big-ip, devops\
**Created:** [March 30, 2020, 1:28am UTC](https://community.f5.com/t/irule-enabling-and-disabling-via-bash-or-cli-or-powershell/54578 "2020-03-30T01:28:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Meganathan](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@Meganathan](https://community.f5.com/u/Meganathan)\
**Post date:** [March 30, 2020, 1:28am UTC](https://community.f5.com/t/irule-enabling-and-disabling-via-bash-or-cli-or-powershell/54578/1 "2020-03-30T01:28:18Z")

</div>

We have a f5 BIG-IP VE version 11.6 during deployment we go to Traffic Manager--\>virtual server--\> manage irule and move an irule “iRule\_maintenance” from available to enabled. After deployment do the reverse process. I want to automate this part via scripting via bash or cmd line or powershell.

---

<div class="post-metadata">

**Author:** ![Samir](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/samir/32/13073_2.png) [@Samir](https://community.f5.com/u/Samir)\
**Post date:** [April 1, 2020, 3:49am UTC](https://community.f5.com/t/irule-enabling-and-disabling-via-bash-or-cli-or-powershell/54578/2 "2020-04-01T03:49:35Z")

</div>

Keeping iRule\_maintenance will not make any issue if you have valid condition written. However it will help during maintenance. But you can change the order of maintenance irule.

If you are looking to add & remove irule from VIP. Then refer devcentral article and customize based on requirement.

Link: [https://devcentral.f5.com/s/question/0D51T00006i7Y7R/add-irule-via-tmsh-without-deleting-existing-irules-and-how-to-reorder](https://devcentral.f5.com/s/question/0D51T00006i7Y7R/add-irule-via-tmsh-without-deleting-existing-irules-and-how-to-reorder)

Thanks,

---

<div class="post-metadata">

**Author:** ![Meganathan](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@Meganathan](https://community.f5.com/u/Meganathan)\
**Post date:** [April 20, 2020, 12:18pm UTC](https://community.f5.com/t/irule-enabling-and-disabling-via-bash-or-cli-or-powershell/54578/3 "2020-04-20T12:18:17Z")

</div>

sorry for the late response. I am not familar with bash script, I see that powershell is supported by f5 any help on that front would be helpful.

f5 has 2 powershell things pssnapin and powershell f5 rest method, which method is suitable for my requirements?

detailed documentation link would be helpful with preferably some examples
