How to rename SharePoint_AdminContent Database
Date: 18/02/2016
Categories: PowerShell, SharePoint
##How to rename SharePoint_AdminContent_<GUID> Database ##Use SharePoint 2013 Management Shell ##Set the New Database Name and set the Central Administration URL $NewDatabaseName = 'SharePoint_AdminContent' $URLCentralAdministration = 'http://server:port' $OldDatabaseDetails=Get-SPWebApplication –Identity $URLCentralAdministration | Get-SPContentDatabase New-SPContentDatabase –Name $NewDatabaseName –WebApplication $URLCentralAdministration $NewDatabaseDetails=Get-SPWebApplication -Identity $URLCentralAdministration | Get-SPContentDatabase | Where-Object {$_.Name -eq $NewDatabaseName} Get-SPSite –ContentDatabase $OldDatabaseDetails.Id | Move-SPSite –DestinationDatabase $NewDatabaseDetails.ID -confirm:$false cd $env:SystemRoot\system32 ./iisreset.exe Remove-SPContentDatabase $OldDatabaseDetails.Id -force -confirm:$false
Leave a Reply