How can I return some enterprise custom fields in a PSI call from Powershell? (Sample code included) RRS feed

  • Question

  • I've looked at Brian's article here, but so much of this is about creating projects.  I just want to read some enterprise custom fields.

    For example, if you point this two-line Powershell script at your Project Server 2010 instance, you'll get a cool pop up of master projects (PROJ_TYPE eq 6):

         $ps = new-webserviceproxy -uri http://servername/projectserverinstance/_vti_bin/PSI/Project.asmx?wsdl
         $ps.ReadProjectList().Project | where-object { $_.PROJ_TYPE -eq 6 } | ogv -title "Projects List"

    ReadProjectList() just brings back the ProjUID, the Name, and the type.  

    How can I simply and cleanly bring back some enterprise custom fields as well?  Just want to read them, not set them.

    I can see I have to dive down in some CustomFieldDataRows but how?  I'm unclear on where to get at them.   There's a method on the Project class called GetChildRows()... is that where I find the CustomFieldDataRows?


    Tuesday, September 14, 2010 9:07 AM

All replies