Home > Project Server, Project Server 2010, Work > #ProjectServer 2010 PSI data to a text file using #PowerShell #PS2010 #Project

#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.

About these ads
  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,706 other followers

%d bloggers like this: