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”,””)}}

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: