In this blog post I want to cover the setup of a new App-V 5.1 Server Infrastructure (Management- & Publishing-Server) from scratch. There are currently a few gotchas which I will cover, that can cause some Confusion if you don’t know them. Regarding the Management Database, I will perform the installation via the SQL Scripts instead of the native installer. The Advantage of this method is that you can use it to place the Management Database on a SQL Cluster.
Below you see a diagram of my servers in my lab environment.
DC01: The Domain Controller is only listed for the sake of completeness, because we will initially create some security groups.
SRV02: This will be our App-V 5.1 Management / Publishing Server. I will refer to this Server as “Management Server” from now on.
DBI01: This will be our SQL Server where we will install the AppVManagement Database.
Please note that the following things are already done in my Lab:
- All Servers are installed with Server 2012 R2 Standard and the latest Windows Updates are applied.
- DB01 has a SQL Server 2014 SP1 installed with the latest Cumulative Update, which is CU3 at the certain moment.
- On DB01 the necessary firewall ports are open so that the Database can be accessed from the Management Server. For details, see: Configure a Windows Firewall for Database Engine Access
Let’s start 🙂
1. Check the supported configurations
You should start by reviewing the App-V 5.1 Supported Configurations and make sure that your Operating System and SQL Server are supported.
2. Create Security Groups
Open “Active Directory Users and Computers” and create two security groups. You can use my names or of course use your own naming standards.
After creation, add your own Admin Account to the “G_App-V_Admins” and the Computer Account of your Management Server to the “G_App-V_Servers” Group.
At the end, the result should be something like that:
Note: Make sure to restart the Management Server after you add it to the Security Group!
3. Install the Management Server Database Prerequisites
TechNet: App-V 5.1 Prerequisites
If you are running Windows Server 2012, I hope you do 😉 , you have to install the following prerequisites on your SQL Server:
Note: On TechNet you find .NET Framework 4.5.1. Please follow my link and go for .NET Framework 4.5.2. The Support for .NET Framework 4.5.1 will be ended in January 2016!
4. Prepare the Management Database SQL Scripts
1. Copy the appv_server_setup.exe to your SQL Server. Open an elevated prompt and run the following command:
appv_server_setup.exe /Layout /LayoutDir=C:\Temp\Layout
You should find the SQL Scripts in your specified LayoutDir in the Sub-Folder DatabaseScripts\ManagementDatabase as below:
2. Since App-V 5.0 SP3 the exported SQL Scripts for the Management Database are containing an error, or in other words they are referencing a Table (SchemaChanges) inside the App-V Management Database that has been dropped with SP3. Microsoft reacted to this issue and published the following KB: https://support.microsoft.com/en-us/kb/3031340
The Problem here is, that the KB only talks about App-V 5.0 SP3, but the issue still exists with 5.1
So, follow the KB and update the InsertVersionInfo.sql and the Permissions.sql Script as described. Below you see the scripts after the modification:
3. Use the following PowerShell Command to retrieve the SID of the Admin Security Group. (Replace HOMELAB with your actual Domain Name)
$account = "HOMELAB\G_App-V_Admins"
Copy the output, which should be something like this:
Remove the leading S and all Hyphens.
Open the Permissions.sql file and replace on Line 31 the following things:
- [ManagementDbPublicAccessAccountSid] –> Modified Admin Group SID as above
- [ManagementDbPublicAccessAccountName] –> Admin Group Name, in my example HOMELAB\G_App-V_Admins
Line 31 should now look like the following:
EXEC dbo.spSetupLogin 0x15213110434424187661054540995869351118, N'HOMELAB\G_App-V_Admins', 0
4. Use the following PowerShell Command to retrieve the SID of the Server Security Group. (Replace HOMELAB with your actual Domain Name)
$account = "HOMELAB\G_App-V_Servers"
Copy the output which should be something like this
Remove the leading S and all Hyphens.
Open the Permissions.sql file and replace on Line 38 the following things:
- [ManagementDbWriteAccessAccountSid] –> Modified Server Group SID as above
- [ManagementDbWriteAccessAccountName] –> Server Group Name, in my example HOMELAB\G_App-V_Servers
Line 38 should now look like the following:
EXEC dbo.spSetupLogin 0x15213110434424187661054540995869351117, N'HOMELAB\G_App-V_Servers', 1
5. At the end your permissions.sql Script should look like that:
4. Install the Management Database
1. Launch SQL Server Management Studio on your SQL Server
2. Run the Database.sql Script against the “master” database.
3. Run the CreateTables.sql Script against the “AppVManagement” Database:
4. Repeat Step 3 for the remaining Scripts in the following Order
5. Check that the Database “AppVManagement” is available and that the tables have been created. Additionally, make sure that the Table dbo.SchemaVersion contains the value 2.
6. Also make sure that the Logins for the Security Groups have been added with the correct permissions as below:
5. Install the Management / Publishing Server Prerequisites
TechNet: App-V 5.1 Prerequisites
Make sure that the following prerequisites are installed on your Management Server:
- Visual C++ Redistributable Packages for Visual Studio 2013
- .NET Framework 4.5.2
- Windows PowerShell 3.0, already installed if OS is Server 2012 R2
- KB2533623, if your App-V Management Server is based on Server 2008 R2
Run the following PowerShell command in an elevated PowerShell prompt to install the required IIS Roles:
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"
Run the following Command in an elevated prompt to configure 64-bit ASP.NET registration:
6. Install the Management Server
6. Enter the Name of the Admin Security Group including the Domain Name. Also you need to specify a Port for the Management Server. You should choose a port that is not in the range of the Well-Known-Ports. Click Next:
7. Choose a port for the Publishing Website. This is the interface that the App-V Clients will access to get the package list. Note: The URL above (http://localhost:PORTNUMBER) is only used by the Publishing Service itself to contact the Management Service. For this reason or in most cases you want that this is the local Management Service. Click Next:
10. Reboot the Management Server
On the Server Page you should see that the Publishing Service is up and running. If you want to add more Management / Publishing Servers for High-Availability you can simply add those in the Servers Security Group, install the prerequisites and run the App-V Server Installer.
If you want to know how to configure your newly installed Full Infrastructure, you can checkout my follow-up post: How to configure an App-V 5.1 Full Infrastructure
Thank you all for reading!