Forum Discussion

psicboy_73704's avatar
psicboy_73704
Icon for Nimbostratus rankNimbostratus
Apr 20, 2010

Dynamically disable nodes, by querying IIS6?

Hi

 

 

Now I’m no developer, so please excuse my ignorance when it comes to scripting. I have a massive task ahead.

 

 

I need to be able to disable a bunch of nodes/pool members from our F5's, dynamically with powershell.

 

 

How I’m trying to do this is to run a powershell script on the host (Windows Server 2003, PSv1, IIS6) which returns all websites and IP’s for that box (3 x sites) from that array I need to extract the IP's for each website, and disable the node on the F5. I have about 10 servers, and am using a 3'rd party app to schedule the running of the PS script, I don't want to get involved so am trying to automate this process.

 

 

So basically my app runs the powershell script, it discovers the three sites, and then uses icontrol to disable the nodes on the F5. Is this possible? I really don't have the skills to write the script, but do have resources at my disposal, that can assist; I just need a basic breakdown on how to do this.

 

 

Any Ideas would be appreciated.

 

 

Thanks

 

1 Reply

  • This can absolutely be done. The first question is whether you want to disable the node as a global object or within the context of a specific pool (ie. a pool member). I've got some samples in the iControl CodeShare that deal with the later. It shouldn't be difficult to convert that script to use the LocalLB.NodeAddress interface instead of the LocalLB.PoolMember interface.

     

     

    Check out the PowerShell topic in the iControl wiki and search for PsPoolMemberControl for some ideas.

     

     

    http://devcentral.f5.com/wiki/default.aspx/iControl/PowerShell.html

     

     

    There are also a bunch of articles in there on tutorials on getting started with PowerShell and iControl as well as how to use various interfaces.

     

     

    Let me know if you get stuck...

     

     

    -Joe