IIS ARR WebFarm Example

I am using an IIS ARR server to accept incoming traffic and to terminate SSL requests. I send the requests to an IIS Web Farm of several servers that handles the requests. I was hoping that someone might have a similar configuration and be able to give me a sample script. I need to create a pair of PowerShell scripts. One that disables a server in a web farm and another script that re-enables the server in the farm. Since all child steps run on the same machine, the script needs to run on the server in the farm and not on the ARR server. Can anyone help me?


You have two possibilities:

  1. Set the ARR so to use a Health Monitoring page from you node. When you planning update, you just return 500 instead 200 and wait while the ARR turned out you node from the farm.
  2. Use powershell (or psexec) to run remote command on the ARR server.
    Commands very simple, powershell cmd-let Set-WebConfigurationProperty or appcmd.exe
    Set-WebConfigurationProperty -Filter ‘/webFarms/webFarm[@name=“MyServerFarm”]/server[@address=“server1.domain.com”]’ -Name enabled -Value $false