Configure Host Pool for Automatic User Assignment in Azure Virtual Desktop | Microsoft Exam AZ-140

Configure Host Pool for Automatic User Assignment

Question

You need to configure a host pool to automatically assign users to Virtual Machines.

Complete the following PowerShell cmdlet to meet the goal.

_______________ -ResourceGroupName <resourcegroupname> -Name <hostpoolname> -PersonalDesktopAssignmentType Automatic.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer: A

The following cmdlet helps in configuring a host pool to automatically assign users to Virtual Machines:

Update-AzWvdHostPool -ResourceGroupName &amp;lt;resourcegroupname&amp;gt; -Name &amp;lt;hostpoolname&amp;gt; -PersonalDesktopAssignmentType Automatic.

Option A is correct.

Update-AzWvdHostPool is the right cmdlet to configure a host pool to automatically assign users to Virtual Machines.

Option B is incorrect.

New-AzRoleAssignment is used to assign a user to the personal desktop host pool.

Option C is incorrect.

New-AzWvdHostPool is not the right command to meet the desired goal.

Option D is incorrect.

Update-AzRoleAssignment won't help in configuring a host pool to automatically assign users to Virtual Machines:

The correct answer is A. Update-AzWvdHostPool.

Explanation: To configure a host pool to automatically assign users to Virtual Machines, you need to use the Update-AzWvdHostPool cmdlet with the PersonalDesktopAssignmentType parameter set to Automatic.

The cmdlet syntax is as follows:

Update-AzWvdHostPool -ResourceGroupName <resourcegroupname> -Name <hostpoolname> -PersonalDesktopAssignmentType Automatic

Here, the ResourceGroupName parameter specifies the name of the resource group that contains the host pool, and the Name parameter specifies the name of the host pool that you want to update.

The PersonalDesktopAssignmentType parameter specifies the type of personal desktop assignment for the host pool. When set to Automatic, users are automatically assigned to virtual machines in the host pool.

Option A is the correct answer, as Update-AzWvdHostPool is the cmdlet used to update the host pool settings.

Option B (New-AzRoleAssignment) and Option D (Update-AzRoleAssignment) are not related to configuring host pools in Azure Virtual Desktop. These cmdlets are used to manage Azure role assignments.

Option C (New-AzWvdHostPool) is used to create a new host pool, not to configure an existing one.