Thursday, July 30, 2015

How to rename an MS Project file

1.In PWA, change project name to the new title and update project ID

2.From SharePoint site, Site Actions, Site Settings, Title, Description, and Icons setting, rename the Title and the URL name

3.In PWA from ‘Server Settings’, select ‘Project Sites’ and select the white space next to the project name. then at the top, edit site address

4.We then need to update the name in the excel file we are using for the business case displayed on the SharePoint sites and the URL code to link buttons from the SharePoint site to the new project ID.

Clean MS Project Local Cache

Never open MS Project files directly from your cache, you should always open from the saved location (typically the MS Project Server) to get the most recent version.  You should periodically clean your cache, to prevent any issues opening or closing MS Project files from the server.
  1. Within MS Project, go to the File menu item on the ribbon and Click on options | Save | Cleanup cache...
  2. Look at both project filters (in the middle of the dialog, projects checked out to you and projects not checked out to you) and highlight the project you wish to remove from your cache and click the "Remove From Cache" button
To add the Cleanup Cache to your quick menu within MS Project (will add an icon to the MS Project ribbon toolbar to go directly to the cleanup cache:
  1. Go to File | Options | Quick Access Toolbar |
  2. Select "All Commands" in the "Choose Commands" combo box
  3. Select the "Cleanup Cache" command and add it to the Quick Access Toolbar.
  4. The Icon will show up on the toolbar next to the undo/redo buttons.
In some extreme cases, when files do not clean from the cache as above you may need to navigate to the folder where the cache resides on your local drive and delete files.  Here are the steps to accomplish that:
  1. Open MS Project, go to menu item Tools -> Local Project Cache -> Cache Settings
  2. Copy the Path given in the Cache Location field
  3. Close MS Project (you have to close MS Project before doing the next steps to release locked cache folders)
  4. Open Windows Explorer and browse to the folder given in the Cache Location, or alternatively you can Paste the path copied in step-2
  5. Delete all subfolders and files under the Cache Location; don’t delete the “Cache” folder itself
  6. Open MS Project again and check the lookup values.  The problem should be fixed.

Thursday, March 19, 2015

Configuration wizard failed: ERR Login Failed for ProjectServer_Published. Failed Upgrade

Issue:

Psconfig failed at step 3 of 4 with the following error in upgrade log:

03/10/2012 2:51:06 8 ERR Login Failed for ProjectServer_Published. Failed Upgrade.
03/10/2012 2:51:08 8 ERR Login Failed for ProjectServer_Draft. Failed Upgrade.
03/10/2012 2:51:09 8 ERR Login Failed for ProjectServer_Archive. Failed Upgrade.
03/10/2012 2:51:11 8 ERR Login Failed for ProjectServer2010_Published . Failed Upgrade.
03/10/2012 2:51:14 8 ERR Login Failed for ProjectServer_Reporting . Failed Upgrade.
03/10/2012 2:51:18 8 ERR Login Failed for ProjectServer2010_Draft. Failed Upgrade.

Cause:

Checked the Database server and didn’t find the above listed DB's. After analysing the logs found that there are 2 project service application were created and the one "Project web service application" was not provisioned successfully. When I looked at the database status it was showing as not responding.

Fix:

Checked and ensure that the application is not being used and needs to be deleted. Executed the following PowerShell cmdlets and removed the Orphaned PWA and was able to complete the wizard successfully.

$psi = get-spserviceapplication | ? {$_.Typename -like "*Project*}
$psi
Outcome : This will return the various Project service applications
$sa = get-spserviceapplication | ? {$_.Id -eq "GUID of the Service App from above"}
$sa
Outcome : Assign the individual service app object to $sa and verify it has been set.
$sc = $sa.SiteCollection
$sc
Outcome : Will assign the SiteCollection details to $sc and display the contents.
Note Id value.
$sa.SiteCollection.Remove("Site Collection ID from above");
$sc

Monday, March 2, 2015

Publish a project based on project name Project Server 2010 Powershell

 The following script is a sample of what an administrator may want to publish a specific project using  PowerShell. The script reads the list of existing projects in Project Server and publishes project based on the project name. Set the $url variable to point to the desired instance of Project Server, and then run the script.

$path = "c:\program files (x86)\Microsoft\Powershell PSI Cmdlets for Project Server 2010\ProjectPSICmdlets.dll"
$assem = [System.Reflection.Assembly]::LoadFile($path)
import-module -assembly $assem


$url = "http://pwaurl/pwa";

$dataset = New-Object System.Data.DataSet
$dataset = psi-ReadProjectList $url;
foreach ($p $projName in $projectList)
{

             if ($p.PROJ_NAME -eq "MyTestProject")
       {
             $projectUid = $p.PROJ_UID;
              "Publishing project guid = " + $projectUid
              $sessionUid = [System.Guid]::NewGuid();
              psi-CheckOutProject $url $projectUid $sessionUid "PS Check out"
              $jobUid = [System.Guid]::NewGuid()
              psi-QueuePublish $url $jobUid $projectUid $true
              $jobUid = [System.Guid]::NewGuid()
              psi-QueueCheckInProject $url $jobUid $projectUid $true $sessionUid "PS Check In"
       }

}

Get the Custom List Columns details Project Server 2010 PowerShell

This scripts returns the custom list columns information like ID, Name & Internal Name of the column in SharePoint 2010/ Project Server 2010 project sites.

[system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint")
$site= New-Object Microsoft.SharePoint.SPSite ("http://pwaurl/pwa/27test")
$web=$site.OpenWeb()
$list=$web.Lists["Actions"]
$list.Fields |select ID, title, internalname| more

Project Server 2010 - SQL- Get Project Tasks & Resources

This SQL query returns the Project Tasks data by all resources assigned to Task for Projects from Project server reporting database. This query might be useful for PMO/ Project Managers to have a quick look on the project/Tasks & Resources assigned to Tasks. This can be used in SSRS reports/Excel reports or in .NET webparts. Project Name can be passed dynamically to fetch the milestone count

Tasks and Resources for projects.sql :

SELECT     
            dbo.MSP_EpmAssignment_UserView.ProjectUID,
            dbo.MSP_EpmAssignment_UserView.TaskUID,
            dbo.MSP_EpmProject_UserView.ProjectName,
            dbo.MSP_EpmTask_UserView.TaskName,
            dbo.MSP_EpmAssignment_UserView.ResourceUID,
            dbo.MSP_EpmResource_UserView.ResourceName,
            dbo.MSP_EpmResource_UserView.ResourceInitials
           
INTO #TempTable

FROM         dbo.MSP_EpmAssignment_UserView INNER JOIN
dbo.MSP_EpmProject_UserView ON dbo.MSP_EpmAssignment_UserView.ProjectUID = dbo.MSP_EpmProject_UserView.ProjectUID INNER JOIN
dbo.MSP_EpmTask_UserView ON dbo.MSP_EpmAssignment_UserView.TaskUID = dbo.MSP_EpmTask_UserView.TaskUID INNER JOIN
dbo.MSP_EpmResource_UserView ON dbo.MSP_EpmAssignment_UserView.ResourceUID = dbo.MSP_EpmResource_UserView.ResourceUID

SELECT
  ProjectUID,
  TaskUID,
  ProjectName,
  TaskName,
  STUFF((
    SELECT ', ' + ResourceInitials 
    FROM #TempTable
    WHERE (TaskUID = Results.TaskUID)
    FOR XML PATH (''))
  ,1,2,'') AS ResourceInitialsCombined,
   STUFF((
    SELECT ', ' + ResourceName 
    FROM #TempTable
    WHERE (TaskUID = Results.TaskUID)
    FOR XML PATH (''))
  ,1,2,'') AS ResourceNameCombined
FROM #TempTable Results
GROUP BY TaskUID,ProjectUID,ProjectName,TaskName

DROP TABLE #TempTable