Sorry, something went wrong An entry with the same key already exist / How to remove PWA site orphaned within Project Server Application Service

I have been removed a PWA Instance within Project Server Application Service via Central Administration in SharePoint 2013.

I tried to recreate a new one with the same details of the previously deleted instance. but unfortunately,  I got the following error:

Sorry, something went wrong An entry with the same key already exist.

PWA error entry exsistCause:

This issue usually occurs because the configuration details of the PWA instance that have been deleted is still stored in Project Server Application Service configuration.thence, you couldn’t create a new one with the same details of the previously deleted instance till removing and clearing the existing orphaned.

Solution:

  • Run SharePoint Management Shell as administrator,

SharePoint 2013 Management Shell

  • Run the following command line to get the Project Server application service details that have been configured in the farm and assign it into $serviceapp object.

$serviceapp = get-spserviceapplication | ? {$_.TypeName –like "*Project*"}

  • Call object $serviceapp to list all PWA application services with its related id.

$serviceapp

Get PWA Service ID.png

  • If you have been configured more than one PWA application service. In this case, you should get the PWA Application service ID that hosted the deleted PWA instance using the following filter command.

$serviceapp = get-spserviceapplication | ? {$_.Id –eq "Service ID"}

  • Define a new object to hold all Site Collections/instances related to Project Server application service > Call it.

$pwainst = $serviceapp.Sitecollection
$pwainst

Get PWA Service site collection

  • After calling “$pwainst” object, the output should show all instances details within the Project Server application service as shown below.

site id pwa

Although I didn’t provision any PWA instances yet, but I got instance details, and that means the configuration details of the deleted PWA instance is still stored in the Project Server application service configuration.

  • Copy the Site Id, then paste it to the following command to remove its orphaned.

$siteid = $pwainst | ? {$_.siteId –eq ""}
$siteid
$siteid.Delete()

  • Again, Call “$pwainst” object to ensure that all orphaned has been cleared.
  • Go back to provision a new PWA instance that should be now worked properly.

PWA Working

Enjoy 🙂

Advertisements

7 thoughts on “Sorry, something went wrong An entry with the same key already exist / How to remove PWA site orphaned within Project Server Application Service

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