Friday 24 April 2015

SharePoint 2013 update conflict has occurred, and you must re-tr this action. The object SPWebApplication Name

While running the command to remove the dodgy extranet web app, got this error

Remove-SPWebApplication : An update conflict has occurred, and you must re-tr
this action. The object SPWebApplication Name=extranetppd.contoso.com was updated by Service Account, in the w3wp
(6180) process, on machine Contoso001.  View the tracing log for more
information about the conflict.
At line:1 char:1

Clear the SharePoint cache , refer to the technet article

Ran the command again, works absolutely fine

Remove-SPWebApplication https://extranetppd.contoso.com/  -Confirm -DeleteIISSite -RemoveContentDatabases

Thursday 23 April 2015

Delete / Force / Remove Rogue or Orphaned Site Collection in SharePoint 2013

Whilst provisioning app catalog site, encountered an issue with the database permissions. Aftering sorting that out, whilst re-provisioning the app catalog site , found the previous attempt added a rogue / orphaned site colleciton.

Though the site colleciton was visible in central admin, however, the option to delete was graded out.

Use the following Powershell, this did the trick.

$site = Get-SPSite https://intranet.contoso.com/apps/appstore
$siteId = $site.Id
$siteDatabase = $site.ContentDatabase
$siteDatabase.ForceDeleteSite($siteId, $false, $false)