At a customer we are using App-V 5.0 and RES Workspace Manager on XenApp 7.6 with Windows Server 2012 R2. For App-V the full infrastructure is in use. We wanted to make it possible for users to do an publishing refresh App-V applications without having them enter powershell commands or having them to logoff and logon. After the publishing refresh the script will initiate a workspace refresh.

I created an application with the following Settings:

Application: Refresh App-V Applications
Command line: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Working directory: C:\Windows\System32\WindowsPowerShell\v1.0\
Parameter: "C:\PROGRA~2\RESSOF~1\WORKSP~1\Data\DBCache\Resources\custom_resources\Scripts\RefreshAppV.ps1"

The content of the ps1 file is the following:

import-module appvclient
Sync-AppvPublishingServer -ServerId 1
#get-appvClientPackage
& "C:\Program Files (x86)\RES Software\Workspace Manager\pwrgate.exe" -2

 

The PS1 is placed in the custom resources in a folder called Scripts. Now when a user clicks the application, first there will be a sync between the client and the publishing server, after that process has completed a workspace refresh will be initiated.


Comments powered by CComment