Project Server 2010: My First Fix with PowerShell – a PWA site that thought it was also a ‘Workspace’


I always suspected that the support for PowerShell in SharePoint Server 2010 and also Project Server 2010 would be very significant both for our customers, and for me and my colleagues in the support organization.  Yesterday I used PowerShell in earnest and a very simple couple of lines resolved a specific issue.

First some terminology changes for 2010 – Project Workspaces are now referred to as Project Sites.  Behind the scenes little has changed, and these are still site that have specific features enabled (Project Site Collaboration Lists) and are based on a particular site template (PWS).  The PWA site, the page with the menus etc. that you get for each instance is based on the PWA site template.

This specific issue turned out to be due to a PWA site being used as the Project Site for a specific project – which isn’t usual, or probably recommended, but can be done by activating the collaboration lists feature and then associating the site with a project.  This adds a couple of properties to PWA’s SPWeb object – the PWAURL and MSPWAPROJUID properties, which are not normally expected to be there.  The net result of this doesn’t break anything in 2007, but can break things later if the site is migrated to another URL – and specifically if the content database is used in a 2010 full upgrade scenario and the URL is not the same as the original. 

The symptom in Project Server 2010 is that Project Detail Pages do not work – so drill down in Project Center, creating new projects in PWA, and even opening PDP’s in the Server Settings area is broken.

So, over to the PowerShell stuff.  On the SharePoint Server you can open the SharePoint 2010 Management Shell (as administrator) and then you can run PowerShell commands against you farm.  WARNING – Don’t play around with PowerShell for the first time with your production server – these commands can break things!  The following commands can show the properties of an SPWeb object.  We are setting $Web to be our SPWeb object for a specific PWA instance and then looking at the Properties (substitute your servername and PWA instance name…):

$Web = get-SPWeb http://<servername>/<PWAInstance>

$Web.AllProperties | Format-Table

The output of the second command showed me that PWAURL was set to a URL I was not expecting – so I could change this back to NULL again using PowerShell

$Web.AllProperties[“PWAURL”]=””

$Web.Update()

And all was resolved!

This can also be resolved in the 2007 system before upgrade by using the UI option to “Remove the URL for the SharePoint Site” in the Edit Site Address section under Server Settings, Project Sites (I’m using the 2010 terminology –  2007 uses “Workspaces” term). 

*** Update *** - another posting on this same topic at http://blogs.msdn.com/b/brismith/archive/2010/05/18/project-server-2010-my-pwa-site-thinks-it-is-a-workspace-site-revisited.aspx 

I’m looking forward to having PowerShell in our support armory, which may help speed up analysis and resolution of issues.  For some other uses of PowerShell and Project Server 2010 see http://code.msdn.microsoft.com/pj14PowershellPSI.

***  Update  *** Thanks Christophe for the suggestion – a couple more links – The Script Center for SharePoint and a link back to the Project ones:

http://gallery.technet.microsoft.com/ScriptCenter/en-us/site/search?f%5B0%5D.Type=RootCategory&f%5B0%5D.Value=sharepoint&f%5B0%5D.Text=SharePoint

http://gallery.technet.microsoft.com/ScriptCenter/en-us/3e134300-3ac6-45b9-a1dc-46b3b03e0b53

Technorati Tags: ,

Comments (9)

  1. Chak says:

    Hi Brian,

    We migrated to new URL on Project Server 2010. We noticed the Project Server 2007 URL still appears when we run the Power Shell commands.  We fixed our issue today using the Power Shell commands as you described here. Thanks for providing the solution.

    Do you have any workaround to prevent this issue prior to upgrade process?

    Thanks again.

    Chak Tukkadi

    http://www.epmcentral.com

  2. Hi Chak, great question and I did a follow up blog posting at blogs.msdn.com/…/project-server-2010-my-pwa-site-thinks-it-is-a-workspace-site-revisited.aspx that givers some SharePoint code to fix things earlier.  I should have added a new link in this blog posting – I will do that now…

    Best regards,

    Brian.

  3. Mega Jim says:

    Genius! This solved my problems editing in PWA.

  4. Swaminathan says:

    We had a similar issue after migrating to PS 2010 and users were unable to create new projects from project center.

    Thank you for the fix. You saved us a lot of time.

    Thank you,

    Swaminathan B

  5. Shaik says:

    My PDP pages were broken after backup and restore, and resetting the pwaurl property to empty.. did the trick… i dont know why.. but… thx.. a lot

  6. Jason Vickers says:

    Thanks for this post.  It's saved me a lot of work.  In our instance, just clearing the PWAURL property as you've listed was enough.  We didn't have to set it to a new value; that value was reset on next load.

    Thanks again

  7. Thanks Brian. It worked just fine.

    Outstanding details in this post. Impressed.

    Alex

  8. Bill Tibbetts says:

    Brian…
    Once again my gluteus maximus has been saved by one of your posts

    Thanks!!!

Skip to main content