Is it possible to manipulate ARR using powershell scripts?RSS

5 replies

Last post Jun 29, 2010 05:57 AM by czarekn

  • Is it possible to manipulate ARR using powershell scripts?

    Feb 01, 2010 11:01 AM|Zac_Kloepping|LINK

    I have some deployment scripts I have made using powershell, but I still have to manually remote onto our ARR machine and remove the server I am deploying to from load balancing.  It would be great if my script could do that for me, but I've very new to both ARR and Powershell to where I'm not even sure if this is possible....

     Ideas?

    ARR PowerShell

  • Re: Is it possible to manipulate ARR using powershell scripts?

    Feb 18, 2010 10:29 AM|jon.torresdal|LINK

    Did you find a solution to this? I didn't see your question until now, so I posted almost the same question here: http://forums.iis.net/t/1165115.aspx

    ---
    Jon T.
  • Re: Is it possible to manipulate ARR using powershell scripts?

    Feb 18, 2010 11:39 AM|Zac_Kloepping|LINK

     Ah, yes looks like we are in a similar predicament :{P

    I never ended up figuring out if it was possible or not.  I also posted the question here:

    http://stackoverflow.com/questions/2165963/is-it-possible-to-use-powershell-to-make-changes-to-application-request-routing

     I got a few responses pointing me in some directions to look, but I didn't end up having enough time to fully explore them.  The thing that seemed most promising was the II7 Cmdlet pack, but I didn't see anything in there for directly doing ARR shtuff :(

  • Re: Is it possible to manipulate ARR using powershell scripts?

    Feb 26, 2010 01:21 AM|PascalN|LINK

    Yes it is possible. Check out this post

    http://forums.iis.net/t/1156563.aspx

  • Re: Is it possible to manipulate ARR using powershell scripts?

    Jun 27, 2010 05:58 PM|MaxASPSteve|LINK

    I have had fairly good luck manipulating ARR via Powershell using the WebAdministration module. To answer the question above, you can set a server to offline using the following:

    Set-WebConfigurationProperty webFarms -Name Collection[0].Collection[0].enabled -Value "False"

     The trick to this is figuring out how to refer to the farm and server. "Collection[0].Collection[0]" references the first webfarm and the first server in that farm (Collection is just another word for array). If you only have one farm, and only one server in the farm, the above command will set it to offline. If you wanted to set the second server in the farm to offline just edit the command above to Collection[0].Collection[1], and if you wanted to take the third server offline in the second farm, Collection[1].Collection[2].

    To bring the server online again, just change -Value "False" to -Value "True"

    I would imagine you could use PS Remoting to accomplish this from a remote machine, but I have not tested that.

  • Re: Is it possible to manipulate ARR using powershell scripts?

    Jun 29, 2010 05:57 AM|czarekn|LINK