question

MariusSabou-2028 avatar image
0 Votes"
MariusSabou-2028 asked prmanhas-MSFT commented

Add new Session Host/VM's to Existing Azure Virtual Desktop Pool

Hi Microsoft Team / Users

Do you know if it's possible VIA a PowerShell / Python script to automate a deployment of a new VM and get registered in the domain, and add it in the Azure Virtual Desktop hostpool.
We need this as to automate our proceess.

Appreciate our answers

Thanks
Sabou Marius

windows-server-powershellazure-virtual-desktop
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered

Hello @MariusSabou-2028,

Thank you for your question and reaching out

Instructions for adding new VM to AVD is outlined here in below Microsoft article , you can use PowerShell or Azure CLI.

https://docs.microsoft.com/en-us/azure/virtual-desktop/create-host-pools-powershell?tabs=azure-powershell#register-the-virtual-machines-to-the-windows-virtual-desktop-host-pool

Also , below is similar thread as per your scenario.
https://docs.microsoft.com/en-us/answers/questions/110851/add-existing-azure-vm-to-session-host-pool-azure-w.html




--If the reply is helpful, please Upvote and Accept as answer--

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MariusSabou-2028 avatar image
0 Votes"
MariusSabou-2028 answered prmanhas-MSFT commented

Dear All,

I succeed,
The script check if the user is in DAG, and add it in case isn't, delete session host, delete old VM resources, create a new one where is joining in the domain and install required Virtual Desktop agent, and add automatically the user session host,
If you need it i can post it here

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@MariusSabou-2028 Glad to hear that!!!

Can you please share it on the post and "Accept as Answer" to help community looking for help on similar topics.

Thanks

0 Votes 0 ·