Menu Close

Category: Powershell

Enabling built-in App-V client in Windows Server 2016

Microsoft has integrated their application virtualization technology named Microsoft App-V within Windows 10 and Windows Server 2016. In this post I will explain how to enable the integrated client and how to use it.

To demonstrate the built-in App-V client in Windows Server 2016 I will use a clean installed Virtual Machines running on VMware Workstation 12 Pro.

With the following powershell command you will get the Windows version.

Windows version

The binaries

Without enabling the App-v Client in Server 2016 there are already files for App-V present on the system. These binaries are located in “C:\Windows\System32”

App-V files

Also the Microsoft App-V Client Services is by default installed. The service is disabled by default, you cannot start this services without enabling App-V.

App-V service

App-V Powershell commands

The following App-V Powershell commands are available:

App-V commands

There is one new command: Enable-Appv
We will use this command to Enable the App-V client on this Server 2016 OS.

Enable App-V

After enabling App-V you can use the App-V powershell commands like you always do.

You can show the configuration in powershell with the following command:


Publish App-V package

To demonstrate the function of the App-V client I will publish an App-V package on Server 2016.

For publishing an App-V package you first need to add it to the client, after adding it you can publish it. Here an oneliner to accomplish this.

Import App-V package 7-Zip

After publishing the application you can use it like any other application. In this case I can start 7-Zip manager via menu start.

7-zip App-V

During the publishing of the application the App-V client will create a cache of the files needed to run the App-V package. Default these cached files are located in “C:\ProgramData\AppV”

App-V cache

Restart services and e-mail succes (Powershell)

This script was originally created to run as a scheduled task. All variables will have to be updated to fit with your own environment i.e. $hostname, $smtpserver. Once run it will complete the following –

1. Send an e-mail to whichever address/s that you specify within the $recipients variable. In my case this was used to inform the alert monitoring team that they can ignore alerts for this service over the next 10 mins.

2. Stop the service specified within the $service variable. A do..Until loop was used to confirm the service had stopped before continuing with the script.

3. Start the service. Again, a do..Until loop was used to confirm the service had started.

4. Send an e-mail to the same recipients informing them that the service has restarted successfully.