locked
Auto-publishing published projects, but not with the version "working" RRS feed

  • Question

  • Hello, I need help to write a script. There is a script for auto-publishing projects on project server, but it is publishes all projects, even those that are not published on the project servers, ie projects with a version working, but not published, it is necessary that he published only with the version published on the project server . Thanks in advance.

    the script:

    CLS
    # Set your variables
    $PWAUrl = “http://ServerName/PWA”
    # initiate the PSI Web Services
    #Project Web Service
    $ProjSvcURL = $PWAUrl + “/_vti_bin/PSI/Project.asmx?wsdl”
    $ProjSvcProxy = New-WebServiceProxy -uri $ProjSvcURL -useDefaultCredential #-credential $Credential
    #Queue web service
    $QSvcUrl = $pwaUrl + “/_vti_bin/PSI/QueueSystem.asmx?wsdl”
    $QSvcProxy = New-WebServiceProxy -uri $QSvcUrl -useDefaultCredential #-credential $Credential
    #Create Dataset & Fill with Project List
    $projDataSet = New-Object Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1_vti_bin_PSI_Project_asmx_wsdl.ProjectDataSet
    $projDataSet = $ProjSvcProxy.ReadProjectList()
    $PrjDS = $projDataSet.Project
    #$projDataSet.Tables[0].Rows.Count
    #CheckOut Project & Publish the Project#
    foreach ($p in $PrjDS)
    {
    Write-host -ForegroundColor green  $p.PROJ_NAME “:: is being Checked Out for publishing” `
    $ProjSvcProxy.CheckOutProject($p.PROJ_UID, [System.Guid]::NewGuid(), “Checkout For AutoPublish via Powershell”);
    sleep 2
    Write-host -ForegroundColor red  $p.PROJ_NAME “:: Will be published now, you may check the queue” `
    $ProjSvcProxy.QueuePublish([System.Guid]::NewGuid(),$p.PROJ_UID, $true,”");
    sleep 2
    $ProjSvcProxy.QueueCheckInProject([System.Guid]::NewGuid(),$p.PROJ_UID,$true,[System.Guid]::NewGuid(),”Checkin Post Autopublish”);
    Write-host -ForegroundColor yellow  $p.PROJ_NAME “:: is being checked in now” `
    }


    Monday, February 10, 2014 5:23 AM

Answers

All replies

  • Hello,

    See the script below:

    http://gallery.technet.microsoft.com/scriptcenter/Server-2010-Publish-all-45ba385b

    Change the "Workingstore" to "PublishedStore"

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Monday, February 10, 2014 9:07 AM
  • Hello,

    See the script below:

    http://gallery.technet.microsoft.com/scriptcenter/Server-2010-Publish-all-45ba385b

    Change the "Workingstore" to "PublishedStore"

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Hello, thanks for the script, it works, the date of publication of changes, but the data from ms project is not updated on the project server.
    Friday, February 14, 2014 6:05 AM
  • Hello,

    If you change the script back to the WorkingStore then the data will update in PWA (same as what you see when opening the draft version in Project Pro.

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Friday, February 14, 2014 9:21 AM
  • Thanks, but what it all draft version "working" translates published, and it is necessary to update the data only with the version "published."
    Friday, February 14, 2014 11:19 AM
  • Ok so you only want to publish projects from the draft / working store that have previously been published? So a user has Project A, project A has been published before in the past but this user has not published the project for a while so there are changes in the project that have not been published? Using the script in the link provided (and below) will do this. Change the "workingstore" to "PublishedStore" so that only the project guids of already published projects are used.

    http://gallery.technet.microsoft.com/scriptcenter/Server-2010-Publish-all-45ba385b

    If I have misunderstand please let me know.

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Saturday, February 15, 2014 6:23 PM
  • Ok so you only want to publish projects from the draft / working store that have previously been published? So a user has Project A, project A has been published before in the past but this user has not published the project for a while so there are changes in the project that have not been published? Using the script in the link provided (and below) will do this. Change the "workingstore" to "PublishedStore" so that only the project guids of already published projects are used.

    http://gallery.technet.microsoft.com/scriptcenter/Server-2010-Publish-all-45ba385b

    If I have misunderstand please let me know.

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Hello, I have two versions of the projects, "working" and "published", your script changes the version of "working" to "published", and it is necessary that a draft version "working" version remained "working". 
    Thanks in advance.
    Monday, February 17, 2014 5:23 AM
  • Hello,

    If you read the projects from the PublishedStore, then working (draft) projects will not get updated / changed to a published project. Only the previously published projects will get published.

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Monday, February 17, 2014 7:35 AM
  • Hello,

    If you read the projects from the PublishedStore, then working (draft) projects will not get updated / changed to a published project. Only the previously published projects will get published.

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Hello,

    How to use the script to change the version of the project was published in a working

    Thursday, March 6, 2014 4:53 AM
  • Hello,

    I'm not sure I understand the question or what you are trying to achieve?

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Thursday, March 6, 2014 9:14 AM
  • Hello,

    I'm not sure I understand the question or what you are trying to achieve?

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Hello!

    Sorry for bad english.

    We close our projects changing version projects "published" to "working" and your script changes the version of projects with "working" to "published", it turns opens the closed projects, and we need to update the information that he only projects with a version of "published" without touching the projects with the version "working". thank you

    Friday, March 7, 2014 5:14 AM
  • No need to apologise :) When you refer to Published and Working is this the default project server stores? When you say changed the project to working do you delete the Published version? If the script reads the Published store, Draft store projects will not get published ( they may appear to get published if the draft project also appears in the published store...) Paul

    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Saturday, March 8, 2014 9:09 AM
  • No need to apologise :) When you refer to Published and Working is this the default project server stores? When you say changed the project to working do you delete the Published version? If the script reads the Published store, Draft store projects will not get published ( they may appear to get published if the draft project also appears in the published store...) Paul

    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Hello!

    Then I can publish only one project? And so every project that version "published." Help write a script to filter on a single project and publish the project.

    Tuesday, March 11, 2014 9:23 AM
  • Hello, see the script below, this allows you to specify the projects to publish in a text file:

    http://gallery.technet.microsoft.com/scriptcenter/Server-2010-Publish-537857d8

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Tuesday, March 11, 2014 9:26 AM
  • Hello, see the script below, this allows you to specify the projects to publish in a text file:

    http://gallery.technet.microsoft.com/scriptcenter/Server-2010-Publish-537857d8

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    The script does not update the project at the project server.
    Tuesday, March 11, 2014 11:48 AM
  • Hello, Please expand? What doesn't update? What are you expecting to happen? This last script just publishes projects listed in the text from the draft DB to the published DB.

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Tuesday, March 11, 2014 10:25 PM
  • Hello, Please expand? What doesn't update? What are you expecting to happen? This last script just publishes projects listed in the text from the draft DB to the published DB.

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Hello, 

    The script does not update the corporate field, at the project server

    Wednesday, March 12, 2014 4:42 AM
  • Hello, 

    The script does not update the corporate field, at the project server

    What type of custom field is "Corporate"?

    If the "corporate" field you mention is a calculated custom field, unfortunately in my experience these types of fields do not update if published via the PSI.  They require publishing via Project Pro.

    Cheers,

       James.

     

    James Boman - http://www.boman.biz Software Consultant for IPMO - http://www.ipmo.com.au

    Wednesday, March 12, 2014 5:47 AM
  • Hello, 

    The script does not update the corporate field, at the project server

    What type of custom field is "Corporate"?

    If the "corporate" field you mention is a calculated custom field, unfortunately in my experience these types of fields do not update if published via the PSI.  They require publishing via Project Pro.

    Cheers,

       James.

     

    James Boman - http://www.boman.biz Software Consultant for IPMO - http://www.ipmo.com.au

    They are published in ms project 2010
    Wednesday, March 12, 2014 6:40 AM
  • They are published in ms project 2010

    Some types of custom field, indicators and calculated columns are not able to be published via script, and require the Project Professional client application to do the publishing.

    Do you have any more specific question?

    Cheers,

      J.


    James Boman - http://www.boman.biz Software Consultant for IPMO - http://www.ipmo.com.au

    Wednesday, March 12, 2014 6:48 AM
  • They are published in ms project 2010

    Some types of custom field, indicators and calculated columns are not able to be published via script, and require the Project Professional client application to do the publishing.

    Do you have any more specific question?

    Cheers,

      J.


    James Boman - http://www.boman.biz Software Consultant for IPMO - http://www.ipmo.com.au

    You can more about the Project Professional client application, thank you.
    Wednesday, March 12, 2014 6:52 AM
  • Hello. Do you have specific questions or this more of a general help / discussion for Project Pro now? Thanks paul

    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Wednesday, March 12, 2014 7:19 AM
  • Hello. Do you have specific questions or this more of a general help / discussion for Project Pro now? Thanks paul

    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    How can I update the corporate box at the project server.
    Wednesday, March 12, 2014 7:37 AM
  • Please can you give details for the "Corporate Box" in Project Server? Is this custom field with a look up table? Formula? Project level, task level etc. How do you expect this to get updated? At what point? How? With what value? etc.  Many thanks Paul

    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Wednesday, March 12, 2014 10:40 AM
  • Please can you give details for the "Corporate Box" in Project Server? Is this custom field with a look up table? Formula? Project level, task level etc. How do you expect this to get updated? At what point? How? With what value? etc.  Many thanks Paul

    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Custom Field written by formula. Planned percent complete to date
    Thursday, March 13, 2014 5:24 AM
  • As James said, you will need project pro to calculate this. It won't work via a script. Paul

    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Thursday, March 13, 2014 7:22 AM
  • As James said, you will need project pro to calculate this. It won't work via a script. Paul

    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Hello!

    Can you tell us more about the Project Pro and how to implement it.

    Friday, March 14, 2014 5:20 AM
  • Can you tell us more about the Project Pro and how to implement it.

    Take a look here.

    Cheers,

       James.


    James Boman - http://www.boman.biz Software Consultant for IPMO - http://www.ipmo.com.au

    Friday, March 14, 2014 5:45 AM
  • Can you tell us more about the Project Pro and how to implement it.

    Take a look here.

    Cheers,

       James.


    James Boman - http://www.boman.biz Software Consultant for IPMO - http://www.ipmo.com.au

    Hello!

    It turns synchronize corporate field can only ms project 2013? In 2010 Ms project can not do this?

    Wednesday, March 26, 2014 4:35 AM
  • If you have Project Server 2010 then Project Pro 2010 is what you need. Paul

    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Wednesday, March 26, 2014 7:14 AM
  • If you have Project Server 2010 then Project Pro 2010 is what you need. Paul

    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    This project pro do mean microsoft project professional 2010? it and so we have
    Wednesday, March 26, 2014 7:47 AM
  • great, that's the one.


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    • Proposed as answer by James Boman Wednesday, March 26, 2014 10:09 AM
    Wednesday, March 26, 2014 9:12 AM
  • great, that's the one.


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Hello!

    So how can I synchronize corporate field with ms project 2010 professinal to Project Server 2010. Where can I read in more detail how to do this.

    Friday, March 28, 2014 6:46 AM
  • great, that's the one.


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Hello!

    So how can I synchronize corporate field with ms project 2010 professinal to Project Server 2010. Where can I read in more detail how to do this.

    Need help me! Please.
    Tuesday, April 29, 2014 10:38 AM
  • Is the corporate field an Enterprise custom field in Project Server? If it isn't and its only a local custom field you will need to create this as an Enterprise Custom field in Project Server, it will then be in both Project Pro and Project Server. To create an enterprise custom field navigate to PWA Server Settings > Enterprise Custom Fields and Lookup tables. Create the field/s here.

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    • Proposed as answer by James Boman Tuesday, April 29, 2014 10:48 AM
    Tuesday, April 29, 2014 10:43 AM
  • Is the corporate field an Enterprise custom field in Project Server? If it isn't and its only a local custom field you will need to create this as an Enterprise Custom field in Project Server, it will then be in both Project Pro and Project Server. To create an enterprise custom field navigate to PWA Server Settings > Enterprise Custom Fields and Lookup tables. Create the field/s here.

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Yea, this is corporate field an Enterprise custom field in Project Server
    Monday, May 12, 2014 11:02 AM
  • As this is an enterprise custom field you it will automatically update in Project Server when you save / publish the project to Project Server.

    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    • Marked as answer by PWMatherMVP Monday, May 12, 2014 11:07 AM
    Monday, May 12, 2014 11:07 AM