none
Easily publish a selected number of projects at the same time... RRS feed

  • Question

  • Hi

    I have about 20 projects (out of a total of 100) that need to be published.  Is there an easy way of doing this (I'm assuming part of this exercise will be to check the project in first)?

    Many thanks 

    James 




    • Edited by JamesP435 Tuesday, June 20, 2017 7:32 AM
    Tuesday, June 20, 2017 7:32 AM

Answers

  • Hello,

    Are you talking about doing this programmatically? If so, you can use the CSOM API, a code snippet to get you started can be see below (I don't have the full script to hand at the moment):

    $proj = $projContext.Projects.GetByGuid($project.Id)
    $draftProject = $proj.CheckOut()
    $draftProject.Publish($true) | Out-Null
    $projContext.ExecuteQuery()

    Get a list of the Project IDs then loop through and publish each.

    Hope that helps

    Paul


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

    • Marked as answer by JamesP435 Wednesday, June 21, 2017 1:59 AM
    Tuesday, June 20, 2017 12:33 PM
    Moderator
  • Hi, There's a freeware tool available, where you can delete, check-in and also publish projects, it is called projtool. I wrote a blog article about it: https://project-brain.com/2016/04/26/projtoolv2-available/

    Best regards, Julian Project Blog

    • Marked as answer by JamesP435 Wednesday, June 21, 2017 1:59 AM
    Tuesday, June 20, 2017 9:15 PM

All replies

  • Hello,

    Are you talking about doing this programmatically? If so, you can use the CSOM API, a code snippet to get you started can be see below (I don't have the full script to hand at the moment):

    $proj = $projContext.Projects.GetByGuid($project.Id)
    $draftProject = $proj.CheckOut()
    $draftProject.Publish($true) | Out-Null
    $projContext.ExecuteQuery()

    Get a list of the Project IDs then loop through and publish each.

    Hope that helps

    Paul


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

    • Marked as answer by JamesP435 Wednesday, June 21, 2017 1:59 AM
    Tuesday, June 20, 2017 12:33 PM
    Moderator
  • Hi, There's a freeware tool available, where you can delete, check-in and also publish projects, it is called projtool. I wrote a blog article about it: https://project-brain.com/2016/04/26/projtoolv2-available/

    Best regards, Julian Project Blog

    • Marked as answer by JamesP435 Wednesday, June 21, 2017 1:59 AM
    Tuesday, June 20, 2017 9:15 PM
  • Great.  Thanks Paul



    • Edited by JamesP435 Wednesday, June 21, 2017 2:00 AM
    Wednesday, June 21, 2017 1:59 AM
  • Thanks for this Julian.  Looks interesting.

    James 




    • Edited by JamesP435 Wednesday, June 21, 2017 2:00 AM
    Wednesday, June 21, 2017 2:00 AM