Menu Close

Category: Windows

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:

Get-AppVClientconfiguration

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

Generate new SID in Windows Server 2012

Today I had to deploy a new Windows Server 2012 VM. Because In VMware you can Clone a VM I used this option. But when it comes to Server 2010, the cloned VM will have a duplicate copy of the SID of the machine from which it was cloned.

This duplicate SID can cause a lot of issues so each machine must have an unique SID. In this post I will show you the steps to generate a new SID in Windows Server 2012.

First log on to the Windows Server 2012 VM. Now open Windows Explorer, and browse to C:\Windows\System32\Sysprep

SD_Browse_Sysprep_Location

Right-click sysprep application and click Run as Administrator

SD_Sysprep_run-as

No the sysprep (System Preparation) tool will open as shown below. Choose Enter System Out-of-the-box Experience (OOBE) option, check Generalize option, choose Reboot as shutdown options and click OK.

SD_SysPrep
For more information about the different switches see (https://technet.microsoft.com/en-us/library/cc721973(WS.10).aspx)

When you click OK, the application will generate new SID and perform all the required actions and will reboot.

SD_Preparing_sysprep

After the reboot is complete, you will be asked to enter the product key, accept License terms, and enter a new Administrator password.

This is how you can generate a new SID on Windows Server 2012.

Configure Email Notification for Windows Server Backup

Windows 2008 (R2) and 2012 (R2) all include the Windows Server Backup feature, which is a reliable but basic backup utility. I only use Windows Server Backup when the server is a physical server. The Windows Server Backup allowing you to restore data or the entire server as necessary. The only downside in WSB is the lack of a reporting function.

Because it is very important to see the status of a back-up job,so that any failures are addressed immediately. WSB doesn’t natively allow you to configure notification emails that advise on the success or failure of each backup.

WBS_Eventviewer
Windows Eventviewer – Backup failure and success events

Windows Server Backup writes operational events to its own event log, located at Logs > Applications and Services Logs > Microsoft > Windows > Backup > Operational. Successful or unsuccessful completion of the backup is logged at this location, so we can use these events as a trigger to send ‘success’ or ‘failure’ email to a particular backup admin user.

WBS_Task_scheduler
Windows Task Scheduler – Backup tasks

Create success email task

The goal is to trigger the notification on backup completion. Because it is more practical to set up two notification (failure of success) we need two tasks.

Click on ‘Create Task’ and configure as follows:

  • Name: Backup Success Email Task
  • Description: Notifies backup admin of scheduled backup successful completion
  • Run whether user is logged on or not
  • Go to the trigger tab, press “New”, choose “On an event”, select “Custom” and then “New Event Filter”
  • Select “By log”, then navigate to “Applications and services logs”, then “Microsoft, then “Windows” then find “Backup” and tick it
  • Use the following Event ID’s

  • Save your changes and navigate to the actions tab of the task
  • Action: Send an email (configure email settings, subject, body etc as required)

Create failure email task

After you configured the correct settings you can save this task and create another one to be triggered on backup failure. This one has more event triggers, because there are multiple backup failure event codes. Configure the task as follows:

  • Name: Backup Failure Email Task
  • Description: Notifies backup admin of scheduled backup failure
  • Run whether user is logged in or not
  • Go to the trigger tab, press “New”, choose “On an event”, select “Custom” and then “New Event Filter”
  • Select “By log”, then navigate to “Applications and services logs”, then “Microsoft, then “Windows” then find “Backup” and tick it
  • Use the following Event ID’s

  • Save your changes and navigate to the actions tab of the task
  • Action: Send an email (configure email settings, subject, body etc as required

If you want to test your email notifications, be sure to check the “Allow task to be run on demand” option under the Settings tab.