First published on TECHNET on Nov 30, 2017
Since it took me a couple of attempts to create VM templates for Azure portal management and Remote Desktop (in order to make them available for the TAP evaluation), I thought it best to share the process, so you can build your own customized image.
My goal is to create a PAW VM that offers user a kiosk experience which is dedicated to one application. When user connects to the VM, it only shows the Azure portal page or the RDP application, nothing else. To create a kiosk experience, I used
s. There are a few ways to configure it. I chose the Windows Configuration Designer downloaded from the Windows Store. You can follow the instructions
to create the package.
Creating provisioning package for Azure portal management
To build the Azure portal package, on the wizard page that defines the Kiosk account and app, select the App type: Classic Windows App, and the full path as
Internet explorer\iexplorer.exe -k portal.azure.com
(note: don’t use quotes around the string, it doesn’t work). To apply the package, simply copied the package inside the VM, which is the online approach below.
Creating provisioning package for RDP
There are two RDP apps for Windows: classic app (mstsc.exe) and Remote Desktop from store. I like the store version for its simple user experience, and choose it for the template. It turns out that I learnt quite a bit from building the package for it:
Store RDP app is not built-in, so I need to find the appx package to install it in the image. To save time, I used an internal copy. You can do this for any applications if it supports
. To install the Appx package:
/add-provisionedAppxPackage /image:e:\ /PackagePath:<path to .appxbundle> /LicensePath:<path to license xml> /DependecyPackagePath:<adding dependency appx if needed>
Where e:\ is the mounted VHDX drive
However, when testing the image above by logon, the app is not there. Apparently, if the app is not pinned to the Start menu, it gets removed during the first user logon, so I added the app to the start menu in the unattend xml file. (For details, see the unattend file section)
Trying the same approach by applying the package online led me nowhere, that's how I learnt the offline approach, and it turns out to be a much simpler process. Because I simply modify the syspreped image without user logon, and I can skip sysprep later to make it a template.
As I have mentioned earlier, there are two ways to apply the (.ppkg) package:
: copies the package file to the VM while it’s running and applied it by simply double-clicking the .ppkg file which applied automatically. After the VM reboots, you will see the kiosk mode experience which shows IE and only connects to the Azure portal page.
To turn this into a template, you can just sysprep the image. I did this by switching to a different user (local admin) where I ran sysprep.
: If you already have a syspreped image to start with, you can apply the package to the image by running