question

RogerRoger-2394 avatar image
0 Votes"
RogerRoger-2394 asked prmanhas-MSFT commented

provision Windows Virtual Desktop

Hi All

I am using WVD classic, i am using github tool to provision wvd. if i want to provision by connecting to rdsAccount is the below syntax correct.


Install-Module -Name Microsoft.RDInfra.RDPowerShell
Import-Module -Name Microsoft.RDInfra.RDPowerShell
Add-RdsAccount -DeploymentUrl "https://rdbroker.wvd.microsoft.com"
Add-RdsAppGroupUser -TenantName "MyTenant" -HostPoolName "WVD" -AppGroupName "MyGroup" -UserPrincipalName "user1@contoso.com"

What is the syntax to know whether WVD(RdsSessionHost) is provisioned for the user or not.

azure-virtual-desktop
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@RogerRoger-2394 Any update on the issue?

Please "Accept as Answer" if it helped so it can help others in community looking for help on similar topics.

Thanks

0 Votes 0 ·

1 Answer

prmanhas-MSFT avatar image
0 Votes"
prmanhas-MSFT answered

@RogerRoger-2394 Apologies for the delay in response and all the inconvenience caused because of the issue.

Firstly I would like to suggest you to go for ARM based deployment rather than classic ones since Classic models will soon be deprecated and there are not current updates as well being push to classic deployments. So rather than going through headache of configuring everything or migrating the current resource or deployment to ARM starting with ARM is the best suggestion. Again it is totally upto you and it is just a suggestion from my side :). You can read more about it here.

Now coming to your query as mentioned here your commands are right. I am just mentioning below the script which I use generally and is similar to yours. The mentioned command above by you should work fine and is completely correct.

This step is required to install the necessary PowerShell module to run any of the WVD or RDS command-lets. Install is only required once. But it doesn't hurt to run these again to ensure you have the latest updates.

Install-Module -Name Microsoft.RDInfra.RDPowerShell -Force
Import-Module -Name Microsoft.RDInfra.RDPowerShell -Force
$brokerurl = "https://rdbroker.wvd.microsoft.com"
$aadTenantId = "The Azure AD Tenant ID "
$azureSubscriptionId = "The Subscription ID "

The Add-RdsAccount command will log you into the WVD Platform Service, the account used here should be the same account you granted Tenant Creator

Add-RdsAccount -DeploymentUrl $brokerurl

The New-RDSTenant command-let will provision your new Tenant this will use your AAD Tenant ID and Subscription ID variables defined above

New-RdsTenant -Name "yourWVDTenantNamehere" -AadTenantId $aadTenantId -AzureSubscriptionId $azureSubscriptionId

Add-RdsAppGroupUser -TenantName "MyTenant" -HostPoolName "MyPool" -AppGroupName "WVD Desktop" -UserPrincipalName "example@mydomain.com"

Now if you want to whether WVD(RdsSessionHost) is provisioned for the user or not you can use below script:

Get-RdsSessionHost -TenantName "MyTenant" -HostPoolName "MyPool" | Where-Object -Property AssignedUser -Eq 'user2@contoso.com'

See this for example.

Hope it helps!!!

Please "Accept as Answer" if it helped so it can help others in community looking for help on similar topics.




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.