You can either use PowerShell or Command Prompt to add Azure AD users to remote desktop users’ groups. Both will do the same job. However, only the command differs.
: – Using Command Prompt add Azure AD user to RD users’ group
If you prefer to use the command prompt, use the below command to add Azure AD users to the remote desktop users’ group.
- Open the command prompt as administrator and run the below command.
net localgroup “Remote Desktop Users” /add “AzureADusername@xyz.com”
[Note: Instead of username@xyz.com email address you need to use your domain email address]
: – Using PowerShell add Azure AD user to RD users’ group
If you want to use PowerShell to add the user to the remote desktop users’ group.
- Open PowerShell as administrator and run the below command.
Add-LocalGroupMember -Group "Remote Desktop Users" -Member "AzureADusername@domain.onmicrosoft.com"
[Note: Instead of username@xyz.com email address you need to use your domain email address]