Scenario:
I need to host Project Web App on a friendly url like https://projects.lewis.com
Provision PWA on a friendly url or existing Site Collection
Approach:
In order to achieve that I need to do the following:
- Create a Site collection at desired URL (host site named collection)
- Create a Project Web App Database
- Enable Project Web App Features on Site Collection
Step 1: Create a Host Site Named Collection on url
New-SPSite “<Site collection url>” -HostHeaderWebApplication “<Web Application Name>” -Name ‘<Enter Name>’ -Description ‘<Enter Description>’ -OwnerAlias ‘lewis\SPA’ -language 1033 -Template ‘PWA#0’
Example
New-SPSite “https://projects.lewis.com” -HostHeaderWebApplication “https://PPM2013” -Name ‘Project Server Development’ -Description ‘Project Server Development’ -OwnerAlias ‘lewis\SPA’ -language 1033 -Template ‘PWA#0’
Step 2: Create Project Server Service application
This setup is followed only if service application has not been created prior.
Step 3 Create a Project Web App database
A Project Web App database is created using the New-SPProjectDatabase SharePoint PowerShell cmdlet.
The new database is associated with the site collection where you want enable the Project Web App site collection features, using the Tag parameter to associate a unique string with this database. That string will be used later when you enable the site collection features, the script is:
New-SPProjectDatabase –Name DatabaseName -ServiceApplication “ServiceApplicationName” –DatabaseServer SQLServerInstance -Tag String
DatabaseName: Name of Project Server DB to be created
ServiceApplication: Project Server Service Application Name
Note: You can find the name of the Project Server service application in Central Administration by going to Manage service applications under Application Management and checking the name of the project Service Application configured
Run SharePoint management Shell in Admin mode.
Example of Script
New-SPProjectDatabase –Name ProjectServer -ServiceApplication “Project Server Service” -DatabaseServer PPM2013 -Tag “PS2013”
Project Server Service: This is the name of the project server service
Once you have created the new Project Web App database, the next step is to enable the Project Web App site collection features. Doing so will associate the database that you just created with the site collection.
Step 4: Enable the Project Web App site collection features
The Project Web App site collection features are enabled by using the Enable-SPFeature Windows PowerShell cmdlet. Prior to running this cmdlet, you must set the PWA_TAG parameter of the site collection to match the Tag parameter that you set when you created the database.
$web=Get-SPWeb https://projects.lewis.com
$web.Properties[“PWA_TAG”]=”PS2013″
$web.Properties.Update()
Enable-SPFeature pwasite -URL https://projects.lewis.com
Once the Provisioning is complete you can browse to the site
Check Provisioning in Manage Project Web Apps
Go To the following
Application Management > Manage Service applications > Project Server Service
Alternate Scripts that you can use:
Click here Blogged by Gordon Lewis