How to perform a bulk publish via PowerShell

Background:

For a number of reasons you may wish to perform a bulk publish of all projects. Reasoning include the desire to force a refresh of permissions to project sites or to update the Project Server reporting database, with updated project site workspace URL’s after existing sites have been deleted and new sites created.

Solution: Perform a bulk publish of all projects.

To bulk publish the projects via PowerShell you can use the below script:

#Replace the highlighted text with the PWA URL and fully qualified domain name.

$svcPSProxy = New-WebServiceProxy -uri “https://PWA.com.au/PWA3/_vti_bin/PSI/Project.asmx?wsdl” -Credential “DomainName\PWAadminUserName”

$svcPSProxy

$EPMTYGUID = [system.guid]::empty

$ProjectList = $svcPSProxy.ReadProjectStatus(“$EPMTYGUID”,”WorkingStore”,””, “0”).Project | format-table proj_uid -hidetableheaders | out-string -stream

$ProjectList

foreach ($projectUid in $projectList)

{

                if ($projectUid -ne “”)

                {

$G = [System.Guid]::NewGuid()

$svcPSProxy.QueuePublish(“$G”, $projectUid, “true”,””)}}

Leave a comment