If you need to automatically assign a user role to a personal desktop, which cmdlet would be used?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Study for the Azure Virtual Desktop Exam AZ-140. Prepare with flashcards and multiple choice questions. Each question includes hints and explanations. Get ready for your exam!

To automatically assign a user role to a personal desktop in Azure, the correct cmdlet to use is the one designed specifically for creating a new role assignment. In this context, when you want to establish a role for a user on a personal desktop, the New-AzRoleAssignment cmdlet is appropriate because it is intended for creating new role assignments in Azure Role-Based Access Control (RBAC).

This cmdlet allows you to specify the principal (which represents the user, group, or service principal) and the role definition you wish to assign. When setting up Azure Virtual Desktops, ensuring the correct roles are assigned is crucial for managing access and permissions effectively, and using New-AzRoleAssignment aligns with this need as it facilitates the direct creation of new assignments.

The other cmdlets provided in the choices serve different purposes: Add-AzRoleAssignment would typically be used for adding role assignments in a way that suggests existing assignments might be modified or supplemented, Set-AzRoleAssignment is used to change an existing role assignment, and Remove-AzRoleAssignment is specifically for deleting an assignment. Hence, they do not align with the requirement of creating a new role assignment for a user on a personal desktop

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy