Installing Microsoft App-V 5.1 on Windows Server 2016

Pre-Requisites Tasks

Step 1: Create the following Active Directory Groups:-

  • GRP-LABAPPVADMINS  – Group for adding AppV Admins for delegated access to Management Console website
  • GRP-LABAPPVSERVERS – Group for adding Computer Accounts of the Management Servers

Step 2: Obtain the SID for the Groups by following the below instructions

Use the following PowerShell Command to retrieve the SID of the Admin & Server Security Group (required later in the document)

$account = "LAB\GRP-LABAPPVADMINS"
(New-Object system.security.principal.NtAccount($Account)).translate([system.security.principal.securityidentifier]).value

APPV11

Note the Output

S-1-5-21-1368237551-799631787-4230672224-1137

Remove S and all Hyphens

1521136823755179963178742306722241137

 

$account = "LAB\GRP-LABAPPVSERVERS"
(New-Object system.security.principal.NtAccount($Account)).translate([system.security.princip

 

APPV12

Note the Output

S-1-5-21-1368237551-799631787-4230672224-1139

Remove S and all Hyphens

1521136823755179963178742306722241139

Step 3: Obtain the ISO SW_CD_App_V_CAL_for_RDS_5.1_MultiLang_MLF_X20-35799.ISO, Browse Open APP-V SERVER 5.1 Folder

Run the following in Command Prompt “appv_server_setup.exe /Layout /LayoutDir=C:\Temp\Layout”

Step 4: Verify SQL Scripts are extracted to C:\temp\layout\DatabaseScripts\ManagementDatabase & C:\temp\layout\DatabaseScripts\ReportingDatabase

APPV10

Step 5: Update the following SQL Scripts

As per https://support.microsoft.com/en-us/kb/3031340, the following scripts need to be updated due to mistakes

  • InsertVersionInfo.sql
    • Change  Line from:
    • INSERT INTO dbo.SchemaChanges VALUES(@dbversion, @minserviceversion)
    • Change Line To
    • INSERT INTO dbo.SchemaVersion VALUES(2)
  • Permissions.sql
    • Change Line from:
    • GRANT SELECT ON dbo.SchemaChanges TO PUBLIC
    • Change Line to:
    • GRANT SELECT ON dbo.SchemaVersion TO PUBLIC

 

Step 6: Update Permission.sql:

  • [ManagementDbPublicAccessAccountSid] –>1521136823755179963178742306722241137
  • [ManagementDbPublicAccessAccountName] –> LAB\GRP-LABAPPVADMINS

The script line should look like the following:-

/* Setting up server login and db login for read-access to SchemaChanges table */
EXEC dbo.spSetupLogin 0x1521136823755179963178742306722241137, N'LAB\GRP-LABAPPVADMINS', 0
GO
  • [ManagementDbWriteAccessAccountSid] –>1521136823755179963178742306722241139
  • [ManagementDbWriteAccessAccountName] –> LAB\GRP-LABAPPVSERVERS

The script line should look like the following:-

/* Setting up server login, db login and db roles for write-access to AppVManagement database */
EXEC dbo.spSetupLogin 0x1521136823755179963178742306722241139, N'LAB\GRP-LABAPPVSERVERS', 1
GO

Step 7: Launch SQL Server Management Studio on your SQL Server

Step 8: Run the Database.sql Script against the “master” database.

Step 9: Run the CreateTables.sql Script against the “AppVManagement” Database

Step 10: Repeat Step 7 against the AppVManagement Database for the following scripts in order listed below:

  • CreateStoredProcs.sql
  • UpdateTables.sql
  • InsertVersionInfo.sql
  • Permissions.sql

Step 11: Update Permission.sql found under C:\temp\layout\DatabaseScripts\ReportingDatabase

  • [ReportingDbPublicAccessAccountSid] –>1521136823755179963178742306722241137
  • [ReportingDbPublicAccessAccountName] –> LAB\GRP-LABAPPVADMINS
/* Setting up server login and db login for read-access to SchemaChanges table */
EXEC dbo.spSetupLogin 0x1521136823755179963178742306722241137, N'LAB\GRP-LABAPPVADMINS', 0
GO
  • [ReportingDbPublicAccessAccountSid] –> 1521136823755179963178742306722241139
  • [ReportingDbWriteAccessAccountName] –> LAB\GRP-LABAPPVSERVERS
/* Setting up server login, db login and db roles for write-access to AppVReporting database */
EXEC dbo.spSetupLogin 0x1521136823755179963178742306722241139, N'LAB\GRP-LABAPPVSERVERS', 1
GO

Step 12: Launch SQL Server Management Studio on your SQL Server

Step 13: Run the Database.sql Script against the “master” database.

Step 14: Run the UpgradeDatabase.sql Script against the “AppVReporting” Database

Step 15: Repeat Step 12 against the AppVReporting Database for the following scripts in order listed below:

  • CreateTables.sql
  • CreateReportingStoredProcs.sql
  • CreateStoredProcs.sql
  • CreateViews.sql
  • InsertVersionInfo.sql
  • Permissions.sql
  • ScheduleReportingJob.sql

Step 16: Run the following command in Powershell (run as administrator) to install AppV 5.1 Windows Features required for Installation.

Add-WindowsFeature -Name "Web-Static-Content","Web-Default-Doc","Web-Asp-Net45","Web-Net-Ext45","Web-ISAPI-Ext","Web-ISAPI-Filter","Web-Windows-Auth","Web-Filtering","Web-Mgmt-Console","Web-Scripting-Tools"

Step 7: Confirm successful Installation

APPV14

 

Install AppV 5.1 Management Server

Step 1: Attach ISO SW_CD_App_V_CAL_for_RDS_5.1_MultiLang_MLF_X20-35799.ISO, Open APP-V SERVER 5.1 Folder

APPV1

 

Step 2: Right Click appv_server_setup, choose Run as administrator

APPV3A

Step 3: Microsoft Application Virtualization splash screen will appear

APPV3

Step 4: Click Install at Setup Screen

APPV4

Step 5: Select i accept the license terms, Click Next

APPV5

Step 6: Select i don’t want to use microsoft update. Click Next

APPV6

Step 7: Select Management Server/Publishing Server/Reporting Server Options. Click Next

APPV7

Step 8: At Select Installation Location, leave as default. Click Next

APPV8

Step 9: At Existing Management Database, enter the below information and Click Next

  • SQL Server Name: Remote SQL Server Name:   LAB-SQL
  • SQL Server Instance:  Use the default Instance
  • SQL Server Database Name : AppVManagement

APPV9

Step 10: At Existing Reporting Database, enter the below information and Click Next

  • SQL Server Name: Remote SQL Server Name:   LAB-SQL
  • SQL Server Instance:  Use the default Instance
  • SQL Server Database Name : AppVReporting

APPV13

Step 11: At Management Server Configuration, enter the below information and Click Next

  • AD Group for Managing App-V: LAB\GRP-LABAPPVADMINS
  • Website name : leave as default
  • Port Binding: 50001

APPV16

Step 12: At Publishing Server Configuration, enter the below information and Click Next

  • Specify Management Service: leave as default
  • Website name : leave as default
  • Port Binding: 50002

APPV17

Step 13: At Reporting Server Configuration, enter the below information and Click Next

  • Website name : leave as default
  • Port Binding: 50003

APPV18

Step 14: At Ready for Installation. Click Install

APPV19

Step 15: Installation will proceed with overall progress bar shown

APPV20

Step 16: Installation will finish. Click Close

APPV21

Step 17: Reboot the Server

Step 18: Log back into server launch http://localhost:50001 and confirm Management Website loads with no errors (ensure user is a member of the GRP-LABAPPVADMINS group)

APPV22

Step 19: Select Servers on Left hand menu, Ensure LAB-APPV1 is successfully showing.APPV23

Install the latest Hotfix (at time of writing this is Hotfix 6)

Step 1: Obtain the Hotfix 6 for AppV 5.1 Server in the following MS KB3168628

Step 2: Run AppV5.1RTM_Server_KB3168628.exe as administrator

APPV24

Step 3: Click Update

APPV25

Step 4: Click i accept the license terms

APPV26

Step 5: Click Next to confirm service interruption and hotfix to be installed.

APPV27

Step 6: Installation progress will be shown.APPV28

Step 7: Click Close  and Reboot the Server

APPV29.PNG

17 comments

  1. I’m getting a “You don’t have permissions error” when accessing the site having followed your setup instructions.

    I’m using a single server, running 2016 and SQL 2012. All the scripts ran ok. I’ve also tried adding the admin group to the dbo.RoleAssignments table but it still is displaying the same error. Any other suggestions?

    1. Hi,
      Have you rebooted the server after the installation? I have seen where you get that message even when you are a member of the correct group and only works after a reboot.

      Let me know if that resolves it.

      Cheers,

      David

        1. can you go into SQL management studio and confirm the security groups appear under the security section to the db to ensure it has been assigned correct.

          if you want to send screenshot, please e-mail me on david@wilkyit.com and i can respond on that as well.

      1. Both accounts are listed under the security section with the server account group with db_datawriter and the admin group with db_datareader memberships.

        The annoying things is that if I just install using the wizard on a single server, without following your guide, I get access to the management site, however, I cannot upload any packaged applications…

      2. Hi David,

        Thanks so much for you help, found loads of errors relating to access being denied to the computer account (rather than the group which the App-V server belongs to) Once I created a SQL Login for the computer account I can now gain access to the site!

        Thanks for taking the time to give me some advice!

  2. Hi David,

    One other question, in the changes you have listed to the permissions.sql file, what is the significance of the 0 or the 1 at the end of the line?

    EXEC dbo.spSetupLogin 0x1521136823755179963178742306722241139, N’LAB\GRP-LABAPPVSERVERS’, 1

    Richard

  3. Hello Wilky,

    Thanks for the kind explanation!
    After all, I have the same issue with mrkeep74. – Credential issue…
    When I looked up the event log for Appv, event ID 202 has been created whenever I access the web page. Can you give me some advice?

    event id 202:
    A data base error occurred. Reason: ‘Cannot open database “AppVManagement” requested by the login. The login failed. login failed for user ‘NT AUTHORITY\NETWORK SERVICE’.’

    Thank you

  4. Followed your article each and every point, the XML still is not showing the packages on the publishing server. Are there specific OS versions that work for Server 2016? We are seeing error 503 inside of the logs as well.

    Any solutions?

  5. I am having problems with applying the most recent patch after the app-v server installation. Are you all guys having the same base version like me – version 5.1.85.0. It seems no Hotfix can be applied to that version?

    BR,
    VIktor

  6. Hello, I have the same issue as mrkeep74 and probably some of the others in this thread and have read his possible solution and of course followed your guide until the management page. It doesnt make any sense to me though as i have both of the servers in the right groups, the domain adminstrator and a user in the groups and added to the sql-server as admins and also given the admin and user rights to almost everything but alas the web-page still says the same. Could you help in any way?

    Sincerely
    Aske

  7. I’ve been trying to get AppV 5.1 Management Server Running on Server 2019, using SQL Server 2019 and discovered two possible causes for the dreaded credential error.

    1. No user/group entry in the roleassignment table
    2. No NT AUTHORTIY/NETWORK SERVICE login with the db_datareader role assigned for the management database

Leave a Reply