Home > Paul Mather, Work > Create a #ProjectServer #PS2010 #PS2013 project from a template and update the EPT #SP2013 #SP2010 #PowerShell

Create a #ProjectServer #PS2010 #PS2013 project from a template and update the EPT #SP2013 #SP2010 #PowerShell

Paul Mather
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011.
I am also a certified Prince2 Practitioner.

This article has been cross posted from pwmather.wordpress.com (original article)

I have been meaning to publish this PowerShell script for a few months but finally got around to it today. The PowerShell script creates a project from a template then updates the Enterprise Project Type (EPT). I did write a post over a year ago on how to create a project using PowerShell but this didn’t update the EPT:

http://pwmather.wordpress.com/2012/01/17/create-and-publish-a-project-in-projectserver-via-powershell-ps2010-msproject-sp2010/

The issue is that even if your Project Plan Template is associated to an EPT in Project Server, the project created from the CreateProjectFromTemplate method is associated to the default EPT regardless. This script will prompt for the project name, the project plan template name and the EPT name. It will create the project then update the project to associate it to the desired EPT. The script can be downloaded from the script gallery below:

http://gallery.technet.microsoft.com/scriptcenter/Create-Server-2010-2013-19bd3cc7

Once downloaded, the script will need to be updated with the correct PWA URL, the lines that need updating are 9 and 23. These can bee seen below:

image

image

Update the http://vm753/pwa part of the URL for your PWA URL.

A walkthrough using the script is below.

Open Windows PowerShell and navigate to the PowerShell file, in this example it is on the desktop:

image

Press Enter and complete the details:

image

The new Project will be called “CPS Test Project by Paul Mather”, it will use the “PMTemp1” template and then associate the new project to the “PM TEST” EPT.

image

The project is created as you can see in the Project Center:

image

It is also associated to the specified EPT:

image

The default EPT on this PWA instance is “Enterprise Project”:

image

When using the CreateProjectFromTemplate method only, this new project would have been associated to the Enterprise Project EPT as this is the default EPT.

This is just an example of what can be done, many improvements could be made, certainly around error handling but it provides a working example for you to build on. Smile

About these ads
Categories: Paul Mather, Work Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

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

Follow

Get every new post delivered to your Inbox.

Join 1,690 other followers

%d bloggers like this: