This PowerShell script will publish all projects in Project Server when run with an account that is an administrator in Project Server. This can either be run on demand or set to run on a schedule using the Windows Task Scheduler. If you want all projects to be published, run on demand / set the windows scheduled task to run using the Project Server adminstrator account. The script will only access the projects that the user running the script has permission to.

A code snippet can be seen below:


$svcPSProxy = New-WebServiceProxy -uri "http://vm353/pwatest/_vti_bin/PSI/Project.asmx?wsdl" -useDefaultCredential  
$EPMTYGUID = [system.guid]::empty 
$ProjectList = $svcPSProxy.ReadProjectStatus("$EPMTYGUID","WorkingStore","""0").Project | format-table proj_uid -hidetableheaders | out-string -stream 
foreach ($projectUid in $projectList)  
    if ($projectUid -ne "") 
$G = [System.Guid]::NewGuid()  

The script will need to be updated with the correct PWA URL for the WebServiceProxy. For further details on this script please see the following post:

 For a JavaScript based version for Project Online / Project Server 2013, see the script below: