App-V 5 Publishing server refresh

Have you been waiting for the App-V 5 publishing server to synchronisation with the App-V 5 management server? The default installation configures the synchronisation for every 10 minutes. This settings is stored within the registry of the server. Microsoft documented this registry in the following website https://support.microsoft.com/en-us/kb/2780177 . Microsoft also describes a manually trigger to start the synchronisation. I want to trigger the synchronisation process to avoid waiting and for emergency changes.

The publishing server is build on top of the IIS “Internet Information Services”. Recycling the application pool “AppvPublishing” triggers the synchronisation  process. Go to Server Management > Roles > Webserver (IIS) > Internet Information Sercices > Application Pools. Right click the application pool “AppVPublishing” and press “Recycle”. During the recycle process the publishing server keeps functioning and responding to requests from App-V 5 clients.16-9-2015 16-23-08

With application deployment and testing i want to avoid waiting for the synchronisation timer. Therefore i need to force the trigger. I use the following PowerShell script to trigger the synchronisation process.

Restart-WebAppPool -Name AppVPublishing

This commando could be given remotely to the publishing server if PowerShell remoting is enabled. You could enable this through Enable-PSRemoting. I have used the following script to force synchronisation over several publishing servers.

[Object]$servers = “AppVPubServer1″,”AppVPubServer2”

foreach ($server in $servers){
$job = Invoke-Command -AsJob -ComputerName $server -ScriptBlock {Restart-WebAppPool -Name AppVPublishing}
Wait-Job -Job $job}

Caution: Beaware of the power of PowerShell. People are able to remove all the App-V packages from the server with one line.

Have fun refreshing the publishing servers!!! Knipogende emoticon

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s