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 “,”
}
Discover more from SharePains
Subscribe to get the latest posts sent to your email.
Is your business still running on paper trails, sprawling Excel files, or ageing Access databases? There's a better way — and I can show you exactly what it looks like.
I'm the Technical Director of Vantage 365, a Microsoft solutions consultancy working with clients across the UK, the Netherlands, and worldwide.
For over 30 years I've been turning messy, manual business processes into clean, automated systems that save time, reduce errors, and give teams the visibility they need to make better decisions.
SharePains is not just any blog run by a Microsoft MVP. Have you ever used Try-Catch in Power Automate? The original post about Try-Catch in Power Automate can still be found on this site, https://sharepains.com/2018/02/07/try-catch-finally-in-power-automate-flow/
Or have you ever used the Pieter’s method to avoid variables and speed up your flows? https://sharepains.com/2020/03/11/pieters-method-for-advanced-in-flows/
You can contact me using contact@sharepains.com