Is it possible when deploying apps using the IIS web farm framework to limit the number of servers the site is deployed on? The use case I am specific looking at is with a multi-tenant load balanced server where specific sites need to be deployed as either not load-balanced, load balanaced on 2 IIS machines, or load balanced on 4 IIS machines. Currently I can't see anyway of customising the replication or by setting parameters when creating the site. Ideally if this is possible, I'd also like to do so via code or PS.
I am not aware of this functionality. However, you can configure all sites on all IIS machines and then use host name affinity to configure how many servers serve each hostname. See iis.net for the complete walkthrough of this feature of ARR.