*** Update 11/6/2-16 - This probably isn't something you need to worry about any longer as the PWA limit was increased to 9999 some time back - although it may still be useful if you want to use a name of a site you deleted... (Thanks for the reminder to update, Edward!) ***
If you have used or are still kicking the tires of the Office 365 Preview and Project Online you may have noticed that you can have up to 3 PWA instances. The first one is provisioned for you as the …/Sites/PWA instance, and you can then either use the New > Private Site Collection with Project Web App option to add a new site collection with PWA, or you can use the Project Web App > Add option to add the feature to an existing site collection. Once you have used all three your SharePoint admin center may look something like this:
The red bar in top right signifying that you have used all your available PWA instances. In the preview we have seen that customers wanting to start afresh with a clean PWA have deleted the site collections and then still not been able to re-use this apparently deleted PWA instance. The reason behind this is that the instance isn’t gone – it is in the recycle bin – and you could actually recover it if you needed to. So how should you remove a PWA instance if you want to recover the quota to re-use somewhere else? We have this documented over on the Office site (thanks Sonia! – and if the link isn’t live it soon will be…) and the key take-away is that you should use the Project Web App > Remove option. This removes the feature from the selected site collection and gives you back one of your quota instances. But what if I have already deleted the site collection? The answer to that question is covered on the link given too – but I’m also going to cover the steps here as well as introducing the concept of administering your SharePoint Online instance via PowerShell.
So my scenario is that I have deleted two of my site collections that had PWA instances – so still see that I have used my quota of 3 – what do I do next?
For the first recovery I will use the option to restore my PWA and then remove properly. So looking in my Recycle Bin from the ribbon I can see my two sites (if I had deleted more than 30 days ago they would be gone anyway – and my quota would have been returned) – and I select the first one and click Restore Deleted Items – and then click Restore on the next dialog..
In my testing the restore took just a few minutes – but my PWA was pretty empty. Once it was back I could select the site collection and use the option Project Web App > Remove, and then click Disable in the next dialog to disable this feature (and we really are sorry to see you remove PWA…).
After this completes, which again for me was just a minute or two, I can see that I now have 1 PWA instance available to re-use – and I still have the …/Sites/PWS site collection. This is important to note – I have disabled PWA which deleted all Project Web App data, including project plans, timesheets and resources – but I still have any pure SharePoint content that may have also existed in that site collection.
For my remaining PWA instance that is still in the recycle bin I am going to take a different approach – and thanks to my colleague Stefan Schwarz for coming up with this workaround. PowerShell is a tool that can be used across many and probably nearly all current Microsoft products. For current Office 365 there is a good article at http://onlinehelp.microsoft.com/en-us/office365-enterprises/hh124998.aspx and for the commands we are interested in you will also need the SharePoint Online Management Shell from http://www.microsoft.com/en-us/download/details.aspx?id=35588 You will also need to install the Microsoft Online Services Sign-in Assistant as noted in the first article.
I prefer using the ISE for PowerShell – so I start this up and then load the SharePoint Online cmdlets using import-module Microsoft.Online.SharePoint.PowerShell (installed from the link above) then connect to my SharePoint Online instance using Connect-SPOService and entering my Tenant admin url and then my credentials. This isn’t just your tenant url but your tenant admin url – for example mine is https://BlogFodder-admin.sharepoint.com.
I can then use the command Get-SPODeletedSite to see what is in my recycle bin:
and to completely remove it I can use another PowerShell command – Remove-SPODeletedSite, along with the Url of the site I wish to remove - and to be extra cautious I can use the –Confirm parameter to give me that last chance to change my mind – and I then even get another last chance with the Permanently removing site dialog…
Once this completes then I did notice it took a couple of minutes and a refresh or two before I could see my available PWA instances count go up to 2.
Remember, the Remove-SPODeletedSite isn’t just removing the Project stuff – but will completely delete everything to do with that site collection. But hey – it was in your recycle bin so I guess you thought you could do without it.
Again, the link to the Office site gives a good breakdown of the options to use and what the consequences of your actions will be.
The SharePoint Online Management Shell isn’t a total replacement for the SharePoint admin center UI – for example you can’t administer PWA instances and features – but it may offer some useful features such as user administration. Another good reference to help understand the differences between the Office 365 and SharePoint Online PowerShell commands is http://technet.microsoft.com/en-us/library/fp161388.aspx. I can see that the PowerShell stuff for Project and SharePoint online will be generating a few more blog posts.
Thanks to Jean Donati and Sonia Atchison for feedback on this article – and Doug Welsby for running into the problem and getting us thinking about documenting the issue – and Stefan Schwarz for the PowerShell commands.