Project server - autospinstaller


  • I am using AutoSPinstaller  - in my xml the project server app is called project server

    In the AutospinstallerModule.psm1 the web app being looked for is 'Portal' so this is one of the reason the below script fails, but i get an

            # Create a Project Server DB (2013 only)
            $portalWebApp = $xmlInput.Configuration.WebApplications.WebApplication | Where-Object {$_.Type -eq "Portal"} | Select-Object -First 1
            if (!(Get-SPDatabase | Where-Object {$_.Name -eq $serviceDB}))
                if (Get-Command -Name New-SPProjectDatabase -ErrorAction SilentlyContinue) # Check for this since it no longer exists in SP2016+
                   Write-Host -ForegroundColor White " - Creating Project Server database `"$serviceDB`"..." -NoNewline
                   New-SPProjectDatabase -Name $serviceDB -ServiceApplication (Get-SPServiceApplication | Where-Object {$_.Name -eq $serviceConfig.Name}) -DatabaseServer $dbServer | Out-Null
                    if ($?) {Write-Host -ForegroundColor Black -BackgroundColor Cyan "Done."}
                        Write-Host -ForegroundColor White "."
                        throw {"Error creating the Project Server database."}
                Write-Host -ForegroundColor Black -BackgroundColor Cyan "Already exists."
            # Create a Project Server Web Instance
            $projectManagedPath = $xmlInput.Configuration.ProjectServer.ServiceApp.ManagedPath
            New-SPManagedPath -RelativeURL $xmlInput.Configuration.ProjectServer.ServiceApp.ManagedPath -WebApplication (Get-SPWebApplication | Where-Object {$_.Name -eq $portalWebApp.Name}) -Explicit:$true -ErrorAction SilentlyContinue | Out-Null
            Write-Host -ForegroundColor White " - Creating Project Server site collection at `"$projectManagedPath`"..." -NoNewline
            $projectSiteUrl = ($portalWebApp.Url).TrimEnd("/")+":"+$portalWebApp.Port+"/"+$projectManagedPath
            if (!(Get-SPSite -Identity $projectSiteUrl -ErrorAction SilentlyContinue))

    But i get the following error :

    New-SPSite : A site collection could not be created as the provided managed path does not exist.  Change the URL to use 
    an existing managed path or create the missing managed path prior to calling this command.
    At D:\sp\AutoSPInstaller\AutoSPInstallerModule.psm1:6222 char:28

    The managed path is PWA, and i can see this set in CA... any ideas why this is failing?

    Monday, November 5, 2018 11:24 AM

All replies

  • You should post the question on GitHub and perhaps one of the developers will answer the question.  AutoSpInstalle is a great tool and have used it many times, however, several places the configuration options are hard code and when changing the options like PORTAL, it is not seen throughout the PowerShell Script.

    Also, I have had many problems with the Project Application aspect of it.  Actually dont think I every got it working. My suggestion is to get the SharePoint Farm up and running using SPAutoinstaller and then find a PowerShell script to install project server. 

    I have a powershell script on github that can help with this.

    Michael Wharton, Project MVP, MBA, PMP and a Great Guy <br/> Website <br/> Blog contains my field notes and SQL queries

    Friday, November 9, 2018 4:06 AM