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.