#ProjectServer 2010 PSI data to a text file using #PowerShell #PS2010 #Project

I recently looked into accessing the Project Server PSI via PowerShell, luckily I came across this MSDN article that helped: http://msdn.microsoft.com/en-us/library/gg607685.aspx#pj14_GettingStartedTa_PowerShell. I needed to get the data into a pipe delimited text file without using compiled code (I’m not a developer!). I have done this before with T-SQL and SSIS but I wanted to try something different. For the purpose of this blog article of have edited the example shown in the MSDN article. The PowerShell script is below:

$pwaUrl = "http://vm353/pwa"

$svcProjectUrl = $pwaUrl + "/_vti_bin/PSI/Project.asmx?wsdl"

$c = Get-Credential

$svcProjectProxy = New-WebServiceProxy -uri $svcProjectUrl -credential $c

$svcProjectProxy.ReadProjectList().Project | Select Proj_name, Proj_UID, Proj_Type `
    | Export-CSV C:\projects.txt -Delimiter "|"

This script will export out a list of Project names, Proj UIDs and the Project Types to the C drive in a text file called projects.txt using the pipe delimiter. Screen shots below show the script and the output.

Script:

image

Output:

image

This is a very simple example but provides a no code solution to access Project Server data via the PSI.

3 thoughts on “#ProjectServer 2010 PSI data to a text file using #PowerShell #PS2010 #Project

    1. In the example above, the account will need at least Manage Queue or Manage Security plus Log On global permissions to access this PSI method, the ReadProjectList method does return all projects in the database and not just the projects the user has access to, but I believe other methods will use the security model to access data.

Comments are closed.

Create a free website or blog at WordPress.com.

Up ↑

%d bloggers like this: