#ProjectServer 2010 PSI data to a text file using #PowerShell #PS2010 #ProjectJuly 15, 2011 at 3:30 pm | Posted in Functionality, PSI | 3 Comments
Tags: Project Server 2010, PS2010
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.
This is a very simple example but provides a no code solution to access Project Server data via the PSI.