How to manage Windows Virtual Desktop

If you want to setup WVD, check this post.

Currently, you can only manage WVD through PowerShell. Here you can see the most common commands to manage your enviroment.

You can only assign a user to a desktop pool or app pool, not both. Neither can a desktop pool contain apps (like it isn’t possible in RDS as well). By default, you create a desktop pool, let’s add an app pool now by running the commands below. Always start with this command, signing in, in the WVD-enviroment.


1
 Add-RdsAccount -DeploymentUrl "https://rdbroker.wvd.microsoft.com"

Add a new WVD App Group

Run these commands to add a new app group.


1
2
3
4
5
$myTenantName = "mytenantname" #If you don't know, try Get-RdsTenant
$hostpoolname = "myhostpoolname" #If you don't know, try Get-RdsHostPool
$rdsremoteappgroupname = "remoteappgroupname"
Get-RdsAppGroup $myTenantName $hostpoolname
New-RdsAppGroup -TenantName $myTenantName -HostPoolName $hostpoolname -Name $rdsremoteappgroupname -ResourceType RemoteApp

Find applications you can publish

If you want to find apps currently able to publish to your new app group, run this command. It will search on your session hosts for apps.


1
Get-RdsStartMenuApp -TenantName $myTenantName -HostPoolName $hostpoolname -AppGroupName $rdsremoteappgroupname

Publish applications

For example, this is how you publish Internet Explorer and Registry Editor.


1
2
New-RdsRemoteApp -TenantName $myTenantName -HostPoolName $hostpoolname -AppGroupName $rdsremoteappgroupname -Name "Internet Explorer" -FilePath "C:\Program Files\internet explorer\iexplore.exe" -IconPath "C:\Program Files\internet explorer\iexplore.exe"
New-RdsRemoteApp -TenantName $myTenantName -HostPoolName $hostpoolname -AppGroupName $rdsremoteappgroupname -Name "Registry Editor" -AppAlias "registryeditor"

Add users to your new app group

Adding users is also very simple, just run this command.


1
Add-RdsAppGroupUser -TenantName $myTenantName -HostPoolName $hostpoolname -AppGroupName $rdsremoteappgroupname -UserPrincipalName <upn>

If you want to publish more app groups, follow the steps above again. Remember, a user can only be a member of the App Group, or the Desktop Group. If you want to assign the user to the app group while being a member of the desktop group, remove it first with this command:


1
Remove-RdsAppGroupUser -TenantName $myTenantName -HostPoolName $hostpoolname -AppGroupName $rdsremoteappgroupname -UserPrincipalName <upn>