locked
Web/Server Farms Removal RRS feed

  • Question

  • User1032345741 posted

    Hi,

    I am wanting to write a clean up script to back out changes on IIS,

    I have a server farm that i want to remove. Obviously through the gui it is easy, but I am wanting to use appcmd, I can seem to find the cdorrect combination of things to make this happy, I am wanting to stick with appcmd, not the powershell cmdlet that is available. I wand something that is self contained.

    Can anyone point me in the right direction.

    Thanks in advance.

    Monday, February 15, 2021 5:35 AM

All replies

  • User1771714573 posted

    Hi Imccourt,

    Please try this.

    appcmd.exe set config  -section:webFarms /-"[name='web farm name']" /commit:apphost

    Don't forget to delete the rewrite rule of this web farm.

    appcmd.exe set config  -section:system.webServer/rewrite/globalRules /-"[name='ARR_farm2_loadbalance']" /commit:apphost
    

    Best regards,

    Brucz

    Tuesday, February 16, 2021 9:57 AM