Extract #ProjectOnline or #ProjectServer 2013 / 2016 Timesheet data #PowerShell #Office365

May 17, 2016 at 4:32 pm | Posted in Add-on, Administration, Configuration, Customisation, Functionality, Information, PowerShell, Reporting | Leave a comment
Tags: , , , , ,

This PowerShell script will use the Project Reporting OData API to extract the timesheet data between the given start and end dates. The user running the script specifies the source PWA instance URL, Username and password. They then enter the start and finish dates in yyyy-mm-dd format and run. The data will then be displayed in the console and output to a CSV file.

This script example can be downloaded here: https://gallery.technet.microsoft.com/Extract-Online-or-Server-c1cba361

To get the script to work you will need to reference the DLL as seen in the image below:

image

This can be installed from the SharePoint Online Client components / management shell. I used the dll from the SharePoint Online Management Shell in this example.

Please note, this has only been tested in PowerShell 3.0 and might not work in other versions. If you have any issues try this in PowerShell 3.0.

Firstly it will prompt for the source PWA URL:

image

Then the username and password:

image

Then the start and finish dates in yyyy-mm-dd format:

image

The script will output the data to the console:

image

It will also create a CSV file in the same folder that the PowerShell script is run from:

image

The CSV file:

image

This was only run against a test PWA instance in Project Online and only my account had timesheet data for the given period, it will return all of the timesheet data for all resources for the given start and finish dates.

This example requires the user to enter the environment details when running but it could easily be updated to hard code these then the PowerShell script could be scheduled to run weekly or monthly etc. The start and finish dates could be made dynamic too.

Whilst this only reads data, as always, this script is provided as is with no warranties etc. use at your own risk and test on a test environment before using on a production environment.

Advertisements

Leave a Comment »

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: