Today I tried to export my project tasks as a csv file using PowerShell. I couldn’t find any helpful documentation on how to do this. A few articles that did almost what I wanted but just not the right thing.

Just a few lines and job done:

$svcProjectUrl = $applicationUrl + “/_vti_bin/PSI/Project.asmx?wsdl”

$svcProjectProxy = New-WebServiceProxy -uri $svcProjectUrl -useDefaultCredential

$project = $svcProjectProxy.ReadProjectList().Project

$project | Select Proj_name, Proj_UID, Proj_Type ` | Export-CSV .\$applicationName.csv -Delimiter “,”

if ($project.Proj_Name -ne $null)     {

Write-Host “Exporting”  $project.Proj_Name

$tasks = $svcProjectProxy.ReadProject($project.Proj_UID, 1).Task

$tasks | Select Task_name, Task_UID |  Export-CSV .\Tasks$applicationName.csv -Delimiter “,”

}

Avatar for Pieter Veenstra

By Pieter Veenstra

Business Applications Microsoft MVP working as the Head of Power Platform at Vantage 365. You can contact me using contact@sharepains.com

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from SharePains by Microsoft MVP Pieter Veenstra

Subscribe now to keep reading and get access to the full archive.

Continue reading