Adding a new user to a WVD app is really easy. Start by establishing a connection with the WVD tenant:
- Start a Powershell console as an Administrator
- Connect to the WVD tenant using: Add-RdsAccount -DeploymentUrl https://rdbroker.wvd.microsoft.com – note you will need to login as a tenant administrator. Tenant admins can be created using https://docs.microsoft.com/en-us/azure/virtual-desktop/virtual-desktop-fall-2019/tenant-setup-azure-active-directory
- Add the user to the app group with the command: Add-RdsAppGroupUser [tenant-name] [host-group-name] [app-group] -UserPrincipalName [user-name]. To remove a user, use the Remove-RdsAppGroupUser command
- To confirm that they are added correctly, you can list all users assigned to the app group: Get-RdsAppGroupUser [tenant-name] [host-group-name] [app-group]
Issues
If you get User is not authorized to query the management service when running Add-RdsAppGroupUser then get an RDS owner on the tenant to run the following command:
New-RdsRoleAssignment -RoleDefinitionName "RDS Owner" -SignInName "[user-name]" -TenantGroupName "Default Tenant Group" -TenantName "[tenant-name]"
This will provide access to all host-pools / app-groups on the tenant.
If you are unable to run the Add-RdsAccount command successfully, it could mean you need to be added as a TenantCreator or that you need to install and import the libraries you need to run this. To do this run the following commands before the Add-RdsAccount command:
- Install-Module -Name Microsoft.RDInfra.RDPowerShell, and then
- Import-Module -Name Microsoft.RDInfra.RDPowerShell
See https://docs.microsoft.com/en-gb/powershell/windows-virtual-desktop/overview for more details.
No Comments
Leave a comment Cancel