Step-by-Step Guide: Publish Apps using Azure Windows Virtual Desktop (Preview)
In my previous blog post about Azure Windows Virtual Desktop (Preview), I have explained what is it and how to publish full desktop using it. You can find it via http://www.rebeladmin.com/2019/04/step-step-guide-azure-windows-virtual-desktop-preview/ . However, in an infrastructure not every user required full desktop access. Some users may only be using certain applications. Azure Windows Virtual Desktop (Preview) also can use to publish an application. In this demo, I am going to show how to publish an application using Azure Windows Virtual Desktop (Preview).
Before we go ahead with the configuration, please make sure you have the following ready.
Windows Virtual Desktop Host Pool – Before we publish applications, we need to have a host pool up and running. This is already described on http://www.rebeladmin.com/2019/04/step-step-guide-azure-windows-virtual-desktop-preview/ . Please follow the guide and configure the host pool.
Install Applications – Any application available on the host's start menu can publish as a remote app. Therefore, please make sure you install the required applications in hosts.
Windows Virtual Desktop PowerShell module – We will be using PowerShell commands to publish the app. Please following https://docs.microsoft.com/en-gb/powershell/windows-virtual-desktop/overview and install the module.
In my demo environment, I already have a host pool configured as follows.
I am going to create a new Remote app group and publish the Microsoft Word application which is already installed in the hosts. To do this,
1. Launch PowerShell console as Administrator.
2. Run Import-Module -Name Microsoft.RDInfra.RDPowerShell to import Windows Virtual Desktop PowerShell module
3. Then run Add-RdsAccount -DeploymentUrl https://rdbroker.wvd.microsoft.com and login to Windows Virtual Desktop environment using an account who has TenantCreator role assigned.
4. Once the login process is completed, we can create a new App group using,
New-RdsAppGroup <AzureADtenantname> <hostpool> <newappgroup> -ResourceType "RemoteApp"
In above, <AzureADtenantname> defines the Azure AD tenant name. This should match what you have used in the initial Azure Windows Virtual Desktop setup process. <hostpool> defines the name of the first host pool you have created. <newappgroup> defines the name of the new app group.
In my demo setup, I have used,
New-RdsAppGroup rebeladmlive.onmicrosoft.com appdemo rapp1 -ResourceType "RemoteApp"
5. To confirm, we can list down the content of the host pool using,
Get-RdsAppGroup <AzureADtenantname> <hostpool>
In this demo, I have used following command,
Get-RdsAppGroup rebeladmlive.onmicrosoft.com appdemo
6. The next step of the configuration is to list down the applications available for publishing. This content is taken from the hosts running in the host pool. To do this use,
Get-RdsStartMenuApp <AzureADtenantname> <hostpool> <newappgroupname>
In the above command, <newappgroupname> defines the name of the new app group we just created.
In my demo environment, I have used,
Get-RdsStartMenuApp rebeladmlive.onmicrosoft.com appdemo rapp1
In the list, I can see the relevant app data for windows Word which I am going to publish. Please note down the value of the AppAlias field.
7. Now we can publish the application using AppAlias value. If not you have to use FilePath, IconPath, IconIndex values to publish the app.
New-RdsRemoteApp <AzureADtenantname> <hostpool> <newappgroupname> -Name <newremoteappname> -AppAlias <appaliasvalue>
In the above command, <newremoteappname> defines the name for the new app. This is what the system will use to display to users. <appaliasvalue> defines the relevant AppAlias value for the app. in my demo it is word.
New-RdsRemoteApp rebeladmlive.onmicrosoft.com appdemo rapp1 -Name Word -AppAlias word
8. As the next step we can assign users to the new app group. We can't add multiple users at the moment. If you need, you have to reuse the same command with different users.
Add-RdsAppGroupUser <AzureADtenantname> <hostpool> <newappgroupname> -UserPrincipalName <UPN>
In the above command, <UPN> defines the full UPN of the user.
Add-RdsAppGroupUser rebeladmlive.onmicrosoft.com appdemo rapp1 -UserPrincipalName email@example.com
Add-RdsAppGroupUser rebeladmlive.onmicrosoft.com appdemo rapp1 -UserPrincipalName firstname.lastname@example.org
Now it is time for testing. I have a login to Windows Remote desktop app as one of the users. This can be download using https://go.microsoft.com/fwlink/?linkid=2068602
As expected, I can see the application.
When I double click, it went ahead and launch the app successfully.
This marks the end of this post. I hope this was useful and If you have any questions feel free to contact me on email@example.com also follow me on twitter @rebeladm to get updates about new blog posts.