Hello @jayllan abecia ,
Welcome to Microsoft QnA.
Yes, you can use Azure Automation Runbook to initialize your Azure Virtual Desktop (AVD) user sessions in advance.
You can create a PowerShell runbook that starts the AVD user session automatically. You can schedule the runbook to run at a specific time every day, so the AVD user session will be ready and initialized before you need it, thereby avoiding the long waiting time.
Here's what you can do:
- Create an Azure Automation Account and import the Azure Virtual Desktop module into it.
- Create a new PowerShell runbook and paste the following code into it, replacing the placeholders with your specific values:
$SessionHostName = "AVD_Session_Host_Name"
$UserUPN = "User_UPN"
$Password = ConvertTo-SecureString "Password" -AsPlainText -Force
$Credential = New-Object System.Management.Automation.PSCredential($UserUPN, $Password)
Import-Module Microsoft.RDInfra.RDPowershell
Start-RDUserSession -HostPoolName "AVD_Host_Pool_Name" -SessionHostName $SessionHostName -UserUpn $UserUPN -Credential $Credential
- Save and publish the runbook.
- Schedule the runbook to run at a specific time every day using the Azure Automation Schedule.
Hope this helps. Do reply back and let me know if you have any further questions :)
Please "accept as answer" if the above information is helpful.