Detect App-V publishing timed out

During the European App-V User Group 2015 I presented a session about a new product called Login PI. This session was all about how to use Login PI to monitor the user experience and availability of App-V delivered applications. This presentation will be published in the upcoming weeks. In the product demo I used a script to verify if publishing has timed out. Within this blog post I will share how to check if the App-V publishing has timed out with powershell.

The publishing stop Event has ID 19002 and is located in “Applications and Services Logs\Microsoft\App-V\Client\Operational”. The 19002 event contains a messages with a return code as you can see in the following picture.


The first step is to collect the event by powershell. Please note: In this example only the first result is selected.

By running the above command the event is stored in the $endEvent variable. The next step is to collect the return code from the event message. By using the regex command we can return the line which contains the return code. We can filter the value so we have the exit code.

The $endEventCode can be used to check if the publishing has timed out as shown in the following if statement.

This way you can notify an user something went wrong during publishing and the applications are not delivered. If you have questions or a comment please leave them below.

Complete code: