none
Automating Project Server 2010 installation and PWA provisioning with Powershell RRS feed

  • Question

  • Hi,

    I am trying to automate the process of installing and configuring Project Server 2010. For the Sharepoint Part, I am using SPModule, which is working fine.

    The difficult part comes with installing Project Server 2010 (if anyone got and idea on how to automate the installation of the PS2010 binaries, please let me know!), but currently I am focusing on configuring Project Server 2010.

    I am using the following Powershell code:

    New-SPServiceApplicationPool -Name $ServiceApplication -Account $ServiceApplicationAccount

    New-SPProjectServiceApplication –ApplicationPool -$ServiceApplication –Name $ProjectServiceAppName

    The first line works fine and creates the Service Application Pool for me, however, the second line always gives me the follwing error:

    "Invalid Application Pool Specified"

    Even when trying with the actual values in the script or on the command line, I still get the error. When I use Central Administration to create the Project Server PSI Application, everything is working fine. After that I also can add a second Project Server PSI Application using the Powershell code.

    When I delete the PSI apps and start from scratch again with Powershell, the "Invalid Application Pool Specified" error is bugging me again.

    Any ideas?

    Kind regards,

    Mark

     

    Thursday, September 30, 2010 1:46 PM

Answers

  • App pool <SPIisWebServiceApplicationPoolPipeBind> type is not a string, it is Microsoft.SharePoint.PowerShell.SPIisWebServiceApplicationPoolPipeBind

    http://technet.microsoft.com/en-us/library/ff607529.aspx

    Specifies the existing IIS application pool to run the Web service in for the new service application.

    $projectapppool = "ProjectServer-AppPool"
    $projectserviceapp = "ContosoProjectServiceApplication"
    $adminaccount = "Domain\farmadmin"
    New-SPServiceApplicationPool  -Name $projectapppool -Account $adminaccount
    New-SPProjectServiceApplication -ApplicationPool $projectapppool -Name $projectserviceapp

    The above steps works absolutely fine.


    Cheers. Happy troubleshooting !!! Sriram E - MSFT Enterprise Project Management
    Saturday, October 2, 2010 4:44 AM
    Moderator
  • The second part has the Error ...

    # Create New Project Server Service Application
    New-SPProjectServiceApplication ApplicationPool -$ServiceApplication Name $PSIAppName

    The underlined characters are not true "minus"-signs.
    Also the Variable $ServiceApplication should not be preceeded by a "-"

    regards

    Thomas

    • Marked as answer by Mark D _NL_ Thursday, November 29, 2012 9:47 PM
    Thursday, March 22, 2012 9:36 AM

All replies

  • Have you looked at the Powershell scripts in the demo pack that can be installed
    on the IW Contoso image?
     
     
    Thursday, September 30, 2010 2:54 PM
    Moderator
  • Thursday, September 30, 2010 9:46 PM
  • Hi Christophe,

    Thanks for the link to the DemoApck. I will have a look!

    I've found your blogposting and I based my code on it (using the new syntax for some commands, as it changed from beta -> RTM). However, the following line fails every time when doing a new deployment:

    # Create Project Service Application
    New-SPProjectServiceApplication -ApplicationPool $projectapppool -Name $projectserviceapp

    The error is "Invalid application pool specified". But when I use central admin to perform the New-SPProjectServiceApplication step manually, using the exact same application pool, everything works fine. If I modify and run the script again to create another PWA with the same AppPool. it works fine.

    Any clues?

    Thursday, September 30, 2010 10:11 PM
  • Not sure, it sounds like the variable $projectapppool  is NULL, I would focus on that
    Blog | Facebook | Twitter | Posting is provided "AS IS" with no warranties, and confers no rights.
    Project Server TechCenter | Project Developer Center | Project Server Help | Project Product Page
    Thursday, September 30, 2010 10:28 PM
  • Typing the command in Powershell using the actual values gives me the same result. When I have the time, I will try to reproduce this on other servers.

     

     

    Friday, October 1, 2010 11:25 AM
  • App pool <SPIisWebServiceApplicationPoolPipeBind> type is not a string, it is Microsoft.SharePoint.PowerShell.SPIisWebServiceApplicationPoolPipeBind

    http://technet.microsoft.com/en-us/library/ff607529.aspx

    Specifies the existing IIS application pool to run the Web service in for the new service application.

    $projectapppool = "ProjectServer-AppPool"
    $projectserviceapp = "ContosoProjectServiceApplication"
    $adminaccount = "Domain\farmadmin"
    New-SPServiceApplicationPool  -Name $projectapppool -Account $adminaccount
    New-SPProjectServiceApplication -ApplicationPool $projectapppool -Name $projectserviceapp

    The above steps works absolutely fine.


    Cheers. Happy troubleshooting !!! Sriram E - MSFT Enterprise Project Management
    Saturday, October 2, 2010 4:44 AM
    Moderator
  • Thanks Sriram! Now I remember of on the greta power of PowerShell is the ability to work with objects, and this is one of them :)
    Blog | Facebook | Twitter | Posting is provided "AS IS" with no warranties, and confers no rights.
    Project Server TechCenter | Project Developer Center | Project Server Help | Project Product Page
    Saturday, October 2, 2010 3:42 PM
  • This is the code I used:

    $ServiceApplication="PSIPool"
    $ServiceApplicationAccount="domain\sa_sps"
    $PSIAppName="Project Web Access"

    # Create Application Pool
    New-SPServiceApplicationPool -Name $ServiceApplication -Account $ServiceApplicationAccount

    # Create New Project Server Service Application
    New-SPProjectServiceApplication –ApplicationPool -$ServiceApplication –Name $PSIAppName

    As far as I can see it is the same code. However, on two different farms I ran into the same error. 

    I rebuilt the script from scratch. This helped, as everything is working fine now. I can't really find what the problem is, perhaps some hidden/strange character (because of copy/paste actions)?

    Thanks for your help.

    Tuesday, October 5, 2010 12:29 PM
  • The second part has the Error ...

    # Create New Project Server Service Application
    New-SPProjectServiceApplication ApplicationPool -$ServiceApplication Name $PSIAppName

    The underlined characters are not true "minus"-signs.
    Also the Variable $ServiceApplication should not be preceeded by a "-"

    regards

    Thomas

    • Marked as answer by Mark D _NL_ Thursday, November 29, 2012 9:47 PM
    Thursday, March 22, 2012 9:36 AM