Azure RemoteApp: Configure Custom Template

RemoteApp is a great feature introduced on Windows Server 2008 R2 to provide applications from a server to many clients. The difference between Terminal Server is the possibility to show only the main window and this is important for the User Experience.


When this feature is the core for many applications and many users outside the LAN, is very important build the right environment and this means one or more Session Hosts, the rights vCPU, vRAM and Disks. Microsoft Azure has introduced RemoteApp in April 2014 as Preview and now are in General Availability in two profiles:


  • Office 2013 Image
  • Custom Image with VPN


The custom image, figure 1, allows IT Manager to use the power of Azure to share internal applications to their users, without buy new hardware. Why this scenario is a good idea? Because you could move the main application on the Cloud, like SAP, without move the database that could stay on your local environment.


Figure 1 – New RemoteApp with VPN


To create this object are required these requirements:


  • Windows Server 2012 R2 with the KB2977219 installed
  • Use VHD file (VHDX files are not currently supported)
  • The image size must be 127 GB or smaller
  • Generation 2 VM is not supported
  • The VHD can be either fixed-size or dynamically expanding. A dynamically expanding VHD is recommended because it takes less time to upload to Azure than a fixed-size VHD filehe disk must be initialized using the Master Boot Record (MBR) partitioning style. The GUID partition table (GPT) partition style is not supported
  • The VHD must contain a single installation of Windows Server 2012 R2. It can contain multiple volumes, but only one that contains an installation of Windows
  • The Remote Desktop Session Host (RDSH) role and the Desktop Experience feature must be installed
  • The Remote Desktop Connection Broker role must not be installed


Create a new Virtual Machine with all pre-requirements, configure all your programs and make sure that everything works.


Note: Make sure your application appears in the Start menu. Also ensure that the icon you see in the Start menu is what you want users to see.


Another step, optional but not too much, is update the OS with the last patches. At this point is possible generalize the computer with the command: C:\Windows\System32\sysprep\sysprep.exe /generalize /oobe /shutdown


Note: Do not use the /mode:vm switch of the sysprep command even though this is a virtual machine.


Now it’s time to configure the Azure side. First of all open the new RemoteApp Collection, as showed in figure 2, and create a new Network, figure 3, to connect the VM with your local environment. In this moment is not possible use an existing VPN, used for IaaS, but is required create a new tunnel dedicated for ARA. The wizard is similar like classic Azure VPN but for me is a little bit easier.


Figure 2 – New RemoteApp Collection


Figure 3 – Network Configuration


After creation and configuration of your Router, will be possible configure the Domain Credentials that will join the new computer into your local domain. This kind of account, figure 4, should be dedicated with the right permission on a specific OU, because is necessary set delegation to Create New Computer Object.


Figure 4 – Credentials Configuration


After these steps it’s possible generate the script to upload the template image, as showed in figure 5. Insert the name, go ahead, download the Upload-AzureRemoteAppTemplateImage.ps1 and copy the script showed into notepad.


Figure 5 – Upload Template Image


Last step! From the same computer where the source vhd is located, download Azure PowerShell cmdlet and run the Upload-AzureRemoteAppTemplateImage.ps1. Upload time depends by your ISP and by VHD dimension, as showed in figure 6.


Figure 6 – VHD Upload


When the image will be uploaded you will be able to publish program, as showed in figure 7.


Figure 7 – RemoteApp Publish


Like Office Collection is necessary allow users to open your custom RemoteApp, from User Access area. You done! Now your personal applications are available via Azure; For all Windows OS, also Windows RT, there is a dedicated application avaiable from the link:; for the others platforms like Windows Phone, MacOS, iOS and Android the Azure RemoteApp are available from Microsoft Remote Desktop app (from Store).


What happen if you want deploy another application? It’s very easy, because the Session Host is joined into your domain so RDP protocol will be available from your internal LAN; in this way you could install another application and share it from Azure Portal. This procedure in not supported, or official, because you must update each of all Session Host. The official procedure is to re-upload the entire image from local.


Maybe the initial steps are too long but the final result is awesome! The great point is the possibility to reduce the costs (Remote Desktop Roles plus the costs for Public Certificate) and improve the reliability and availability. If you need more power of Session Host, is possible change the Scale Plan from Basic to Standard but is also possible send an email to Microsoft Support to request a Custom Plan. More details at this link: