Check entities from multiple #ProjectOnline PWA instances using #PowerShell and CSOM #Office365

November 4, 2015 at 10:32 pm | Posted in Add-on, Administration, Configuration, Customisation, Functionality, Information, PowerShell | 1 Comment
Tags: , , , , ,

This PowerShell script enables admins to read entities from from multiple Project Online Project Web App instances using CSOM. The particular example reads the list of Enterprise Custom fields but can easily be updated to display other entities such as projects. The script example can be downloaded here:

https://gallery.technet.microsoft.com/Check-entities-from-a1cb87e4

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

image

The first one is the ProjectSever Client DLL, as I ran this on my Project Server 2013 server so just referenced the default location of the DLL.

The second DLL is the SharePoint client DLL from the SharePoint Online Management Shell: https://www.microsoft.com/en-us/download/details.aspx?id=35588 

Once the references to the DLL’s are updated the script can be run as seen below. Please note, this has only been tested in PowerShell 3.0 and might not work in other versions. I have seen issues in the past loading some SharePoint / Project Server DLL’s in certain versions of PowerShell so if you have issues try this in PowerShell 3.0.

Firstly it will prompt for how many PWA instances, enter the number:

 image

It will then prompt for the PWA URL:

 image

Then the username:

 image

Then enter the password:

 image

The custom fields from this instance will then display:

 image

Depending on how PWA instances you specific the script may or may not prompt for another PWA instance URL, username and password. If you specified more than 1 PWA instance the output will look like this:

 image

As seen, this displays custom fields but could easily be updated to display another entity, for example to see a list of projects. This can be done by changing the following lines:

From:

image

To:

image

Whilst this is very simple by just reading data, this could be updated to create new custom fields for example and push that out to multiple PWA instances without having to navigate to multiple PWA instances. I have created an example .NET C# console application that I will blog about soon that creates new custom fields on multiple PWA Project Online instances.

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

1 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

Blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: