powershell
3 TopicsCreating a pool and hosts via Powershell
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.Solved1.8KViews0likes2CommentsAutomatic Right Sizing of Azure VDI's
https://www.lieben.nu/liebensraum/2022/05/automatic-modular-rightsizing-of-azure-vms-with-special-focus-on-azure-virtual-desktop/ Free PowerShell script, you can use it on-demand or on a scheduled basis 🙂 Read the linked blogpost for full instructions/guide.1.4KViews0likes0CommentsBulk Start/Stop of Azure Virtual Desktop Session Hosts in a Host Pool via Single Trigger
Hi Community, We manage an Azure Virtual Desktop (AVD) host pool with a large number of session hosts (e.g., around 100), and we’re looking for a way to start or stop all session hosts in bulk using a single trigger—preferably via PowerShell or an API. Currently, we use a scheduled script that loops through each VM individually to start or stop them, but this approach doesn't scale well. We’ve noticed that the Azure Portal provides a one-click option to start or stop all session hosts in a host pool, and we’re trying to replicate that behavior programmatically. What We’re Looking For: A PowerShell command or script that can start/stop all session hosts in a host pool without iterating through each VM. If PowerShell doesn’t support this directly, is there an ARM template, Azure CLI command, REST API, or any other method that can be triggered from PowerShell to perform this bulk action? Any official documentation, community guidance, or examples from someone who has achieved this would be greatly appreciated. Goal: To simplify and optimize our automation by using a single command or API call to manage all session hosts in a host pool, rather than looping through each machine individually. Thanks in advance for your help and suggestions!136Views0likes3Comments