Forum Discussion
mvz12
Feb 14, 2024Copper Contributor
Configure Newly Added to Pool in Drain Mode
Hi, I need a way to ensure that new hosts being added to a pool are in Drain Mode when they get added. The pool has automatic assignment enabled and we are finding that when new Session Hosts are p...
MrR0b3rt
Feb 19, 2024Copper Contributor
Unfortunately not, a script is the only solution here. Even discussed this with several Microsoft engineers.
What I've done in multiple environments is outputting all the host names from the ARM/Bicep deployment and using that output to set all the hosts to drain mode (you might need to do some things with the output parameters to get the correct parameter value, something along the lines of'<host pool name>/<hostname><.ADDomainName (if applicable)>').
Another plus for using a deployment script is that you can generate a host pool registration key on the fly, so you can automate the deployment even better.
What I've done in multiple environments is outputting all the host names from the ARM/Bicep deployment and using that output to set all the hosts to drain mode (you might need to do some things with the output parameters to get the correct parameter value, something along the lines of'<host pool name>/<hostname><.ADDomainName (if applicable)>').
Another plus for using a deployment script is that you can generate a host pool registration key on the fly, so you can automate the deployment even better.