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\
The content of the ps1 file is the following:
Sync-AppvPublishingServer -ServerId 1
& "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.