Have you ever wondered how the App-V Client functions when adding a publishing server to the App-V client? This post should help you understand what happens behind the scenes and I need to be clear there is a difference between versions of the client and this is explained below.
When you add a publishing server using “Add-AppvPublishingServer” cmdlet the default settings set on the client is the below:
The explanation of each key setting from Technet are:
GlobalRefreshEnabled - Enables global publishing refresh (Boolean) GlobalRefreshOnLogon - Triggers a global publishing refresh on logon. (Boolean) UserRefreshEnabled - Enables user publishing refresh (Boolean) UserRefreshOnLogon - Triggers a user publishing refresh onlogon. (Boolean)
Basically and a key point here is that the GlobalRefreshEnabled and UserRefreshEnabled settings allows a non-admin user to initiate either sync via PowerShell if they are set to “True”, if they are set to “False” a non-admin user can’t initiate a sync manually.
So when you do a sync as a user in the “Operational” event log you will see the following 3 events:
19001 – Publishing Refresh started. URL: http://appvserver:8181 Global: false 19804 – File type associations, shell extensions, and shortcuts updated. 19002 – Publishing Refresh stopped. URL: http://appvserver:8181 Global: false
This is where it gets interesting and this will only occur with the SP3 client and above and I will explain why.
If you change the Publishing Server configuration to enable GlobalRefreshEnabled and GlobalRefreshOnLogon using the Set-AppvPublishingServer cmdlet you will see the following result.
If you check the Operational event log now you will now see 6 event in the operational log on a USER sync using “sync-appvpublishingserver 1”. (Note: I cleared the event log before initiating this sync)
If you look at the event that’s highlighted below you will see something interesting that in the first event 19001 the Global flag is set to “true”!!!!!!!!!!!
Why is the Global flag setting “true” when a user has a user refresh only???
If you check the KB for App-V 5.0 SP2 Hotfix 5 we introduced a new feature and note a key piece of text “by using Windows PowerShell.”
Issue 1: Connection groups cannot support both user-published and global-published packages
App-V 5.0 SP2 does not let you create user-entitled connection groups that contain both user-published and global-published packages.
With this hotfix release, App-V 5.0 SP2 supports creating user-entitled connection groups that contain user-published and global-published packages by using Windows PowerShell.
What happened with the SP3 release we extended this support for the App-V Publishing Server on the App-V Client to ensure a connection group could be created that has both machine and user published packages. On a user “sync-appvpublishingserver 1” the client completes a global sync first then a user sync to ensure the connection group can be created.
Why is this important to understand?
It’s especially important when using Remote Desktop Services where users share the same machine. If a user completes a sync and updates a machine configured package, then the App-V client will send those packages into a pending state and remember to update a machine / globally published package all user MUST log of the machine for that change to take effect.
The next question is there a way to turn this off? Well there is a way if you set the publishing server GlobalRefreshEnabled to false then if a user does a user sync the global sync won’t occur.
Hope this helps in understanding what happens when syncing against our publishing server.
David Falkus | Senior Premier Field Engineer | Application Virtualization, PowerShell, Windows Shell