Creating a pool and hosts via Powershell

Not applicable

I'm working on a script to try and create a new pool, a number of hosts, grant permissions to them and then join the hosts to the pool. This all looks fairly doable but the only bit that looks a little tricky to automate is joining the created hosts to the pool.


Looking over the WVD documentation I need to generate a token for the RDS pool, then install the agent on each host and enter the token. Is there a way to silently do this via the agent installer, or some other method I've not discovered?


Obviously I can create the pool and hosts directly in Azure which achieves this, but I'd prefer to automate this in Powershell instead though.

2 Replies
best response

@Deleted : Have you taken a look at the GitHub ARM template we have that helps you create VMs then register them to a host pool? You should be able to extract/re-use a lot of the PowerShell/PowerShell DSC logic from it if the tool doesn't match your needs.

This looks helpful, thanks.