Changing the App-V 5 Server Ports after Setup

In a recent TechNet Forum Thread, the Question came up on how to change the App-V
Server Ports, after the Setup. The Ports are initially specified in the Installation Wizard, as you see below.

appv_changeports_01 appv_changeports_02 appv_changeports_03

Usually there is no need to change them, however in some Scenarios this might be necessary, for example if you specified the wrong ports during the Initial Setup or due to a changed Network Topology.

Changing the Ports is actually straight forward, but there are some things which should you keep in mind. First, we actually need to know how App-V is communicating, to find out which Components we need to change.

Below is a basic Diagram, that contains a Client, a Load-Balancer and two App-V Servers. I intentionally used a Load-Balancer in the Diagram, even though you might have specified your Servers individually in GPO.

As you see, the Client first gets the Server Information via Group Policy Objects. With that Information, the Client contacts the Load Balancer,  which redirects the Request to the App-V Servers. This means we need to update the GPO, the Load-Balancer and the App-V Servers.

In this Example, I will change the ports from the Management-, Publishing and Reporting-Service Websites. The Ports, which I use in this example, can be found below:

WebsiteOld PortNew Port
Management Service6000061000
Publishing Service6000161001
Reporting Service6000261002

Make sure you have a Backup of your App-V Servers, before you perform the changes. Also, there might be a short downtime, until you modified all Components in the Communication Chain and the GPO was updated on all Clients, which normally happens every 90 minutes.

Modifying the App-V Servers

Do the below steps on each of your App-V Servers.

Management Service

Open the Internet Information Services (IIS) Console, Select the “Microsoft App-V Management Service” Website and Click on “Bindings”

appv_changeports_04

Select the Binding and Click “Edit”

appv_changeports_05

Enter the new Port Number, Click OK, and Close the Bindings Window

appv_changeports_06

Open regedit and navigate to the following Hive:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AppV\Server\ManagementService

Update the Values below with the new Management Service Port Number:

MANAGEMENT_CMDLETS_URL
MANAGEMENT_CONSOLE_URL
MANAGEMENT_WEBSITE_PORT

Publishing Service

In the IIS Console, Select the “Microsoft App-V Publishing Service” Website and Click on “Bindings”

appv_changeports_08

Select the Binding and Click “Edit”

appv_changeports_09

Enter the new Port Number, Click OK, and Close the Bindings Window

appv_changeports_10

Open regedit and navigate to the following Hive:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AppV\Server\PublishingService

Update the Values below with the new Port Numbers. Make sure to enter the correct Numbers!

PUBLISHING_MGT_SERVER
PUBLISHING_WEBSITE_PORT

appv_changeports_11

Reporting Service

In the IIS Console, Select the “Microsoft App-V Reporting Service” Website and Click on “Bindings”

appv_changeports_12

Select the Binding and Click “Edit”

appv_changeports_13

Enter the new Port Number, Click OK, and Close the Bindings Windows

appv_changeports_14

Open regedit and navigate to the following Hive:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AppV\Server\ReportingService

Update the Value below with the new Reporting Service Port Number:

REPORTING_WEBSITE_PORT

appv_changeports_15

Restart the Server and verify afterwards, that you can access the updated Websites, using the new Ports. Also check the App-V Server Event Logs (Server-Management / Server-Publishing) for Errors.

Modifying the Load-Balancer

Edit your Load-Balancer and update the Website Configurations with the new Port Settings. If you only have 1 App-V Server and/or you directly entered your App-V Servers separately in the GPO, you can skip this step.

Modifying the GPO

Remember, this step is not needed, if you only modify the Port of the Management Service!

Open the Group Policy Management Console and edit the GPO, which contains your App-V Configurations.

Publishing Service

Navigate to the following Folder:

Computer Configuration\Policies\Administrative Templates\System\App-V\Publishing

appv_changeports_16

Edit the enabled Publishing Server Settings and update the Port Number of the Publishing Server URL.

appv_changeports_17

Reporting Service

Navigate to the following Folder:

Computer Configuration\Policies\Administrative Templates\System\App-V\Reporting

appv_changeports_18

Edit the “Reporting Server” Setting and update the Port Number of the Reporting Server URL.

appv_changeports_19

Testing the updated Configuration

Head over to a Client and update the Group Policy by running “gpupdate /force” in a PowerShell Prompt.

appv_changeports_20

Run the following Cmdlet in a PowerShell Prompt.

Get-AppVPublishingServer

Validate, that the URL is being displayed with the updated Publishing Service Port Number.

appv_changeports_21

Run the following Cmdlet in a PowerShell Prompt.

Get-AppVClientConfiguration

Validate, that the ReportingServerURL is being displayed with the updated Reporting Service Port Number.

appv_changeports_22

Run the following Cmdlet in a PowerShell Prompt.

Get-AppVPublishingServer | Sync-AppVPublishingServer

Validate, that you don’t get any Sync Error.

appv_changeports_23

Run the following Cmdlet, in an elevated PowerShell Prompt

Send-AppVClientReport

Validate, that you don’t get an Error.

appv_changeports_24

You can do further testing by assigning a New Application and test if the Report Data is getting updated accordingly in the AppVReporting Database.

Rate this post
Tags:,

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.