Project Server 2010 / 2013 - Publish all projects

This PowerShell script will publish all projects in Project Server when run with an account that is a Project Server administrator. This can either be run on demand or set to run on a schedule using the Windows Task Scheduler.

 
 
 
 
 
4.2 Star
(13)
4,221 times
Add to favorites
Project Server
3/24/2015
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Publish Project With Certain Property
    1 Posts | Last post September 20, 2017
    • Hi,
      
      My organization does not delete completed project and they remain in draft/published dbs. To differentiate between active and completed project we added a property and called it 'Project State'. I wonder if you can direct me to a script similar to this one that publishes by click of a button but adds a condition 'Where Project State = Active'?
      
      Thanks, David
  • Cannot convert argument error
    1 Posts | Last post September 13, 2016
    • I ran this PowerShell script and received the following error:
      
      Cannot convert argument "1", with value: "", for "QueuePublish" to type "System.GUID"."
      
      $svcPSProxy.QueuePublish <<<< <"$G", $projectuid, "true","">>>
      
      Any information to fix would be appreciated...
  • Script works but does not publish all project
    1 Posts | Last post May 31, 2016
    • Hello all,
      
      I run the script in my Project Environment, It publish the project but some are not publish.
      I try to understand where it can come from.
      A master project is not publish, like the children projects as well.
      
      do you know how can i publish them all.
      
      Thanks for the feedback
      
      Regards
  • works also for Project OnLIne
    1 Posts | Last post April 08, 2016
    • Hi Paul, 
      great job !
      Does this script also work for Project OnLine as such ? 
  • Published project not publishing
    1 Posts | Last post November 02, 2015
    • Hi , 
      
      I tried this script its working fine but its not publishing published projects. 
      We need to publish all published projects for the status of the projects. We have some indicator to fetch delayed tasks. How can we make this could you please help me.
  • Compatibility mode
    5 Posts | Last post August 18, 2015
    • Is there a switch that can be added to this script that can publish each project and take it out of Backward Complatibilty Mode (BCM), as we migrated from PS2007 to PS2010 and then turned off BCM and want to publish all the projects. We ran this one and it works just fine, but all the projects are still in the BCM mode? 
    • Hi David,
      
      You will need to open the projects in Project Pro 2010 then save and publish.
      
      Thanks
      
      Paul
    • David, not sure if you care at this point, but I ran into the same problem as I wanted about 2500 projects upgraded from version 12 to 14.  I can send you the VBA and SQL I used to make this happen over a conversion weekend (took some babysitting, as I didn't have any means to manage Project's memory, and this occasionally bombed).  Shoot me a note if interested - happy to send your way.
    • I just ran into the same issue. Just running the publish script does not upgrade the projects to version 14. Can you please send me the VBA and SQL script you mentioned?
      
      Thanks!
    • Can I also get the VBA and SQL script please?
  • Requirement is to publish only 'Active' projects
    1 Posts | Last post August 18, 2015
    • Hello Paul,
      Thanks for sharing this script and it is really good indeed but my requirement is little bit filtered like my organisation has total 400 around projects in which only 150 projects are active.This script in general publish all projects and I do not want unnecessary load on server by publishing all.So my need to publish only 'Active' projects and this differentiation is through a custom field 'Project State'.
      
      Any help how to achieve it?
      
      Thanks in advance.
      
      Regards,
      Ashish
  • Update Project formula fields
    2 Posts | Last post July 30, 2015
    • Hi,
      All the project fields are getting updated when projects published,but the formula fields are not getting updated. Is there a way to get the updated formula fields when the this code is used.
      
      
    • I am also looking for the solution of same question. . . Indresh.
      Paul can help here. . .
  • Script to calculate projects
    1 Posts | Last post March 19, 2015
    • thx for your script
      i was wondering if i can modify your script to calculate then publish all my projects
  • update "status date" then publish
    2 Posts | Last post February 08, 2014
    • Hi;
      I wanted to find a way to change all projects "status date" and then publish all projects.
      is it possible to do this by your script?
      I ran your script on power shell on server 2008 R2 enterprise and got these errors:
      The term 'svcPSProxy' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
      spelling of the name, or if a path was included, verify that the path is correct and try again.
      At line:1 char:11
      + svcPSProxy <<<<  = New-WebServiceProxy -uri "http://epm2007srv/PWA/_vti_bin/PSI/Project.asmx?wsdl" -useDefaultCredent
      ial
          + CategoryInfo          : ObjectNotFound: (svcPSProxy:String) [], CommandNotFoundException
          + FullyQualifiedErrorId : CommandNotFoundException
      
      You cannot call a method on a null-valued expression.
      At line:1 char:45
      + $ProjectList = $svcPSProxy.ReadProjectStatus <<<< ("$EPMTYGUID","WorkingStore","", "0").Project | format-table proj_u
      id -hidetableheaders | out-string -stream
          + CategoryInfo          : InvalidOperation: (ReadProjectStatus:String) [], RuntimeException
          + FullyQualifiedErrorId : InvokeMethodOnNull
    • Hi Sam,
      I believe you will need Project Pro to set the status date, I don't think you can do this via the PSI.
      
      Regarding the error, svcPSProxy is just the variable, may be there was an issue connecting to the PSI web service on your farm?
      
      Paul
1 - 10 of 17 Items