Prevent site collection administrators from upgrading site collections
If you are upgrading from SharePoint 2010 to SharePoint 2013, and you need to prevent site collection administrators from upgrading site collections, then you can disable Self Service Upgrades using the Get-SPSite cmdlet: $portal = Get-SPSite “http://portal.lab.local” $portal.AllowSelfServiceUpgrade = False…
PowerShell script to report the last modified date for all sites within a site collection
In response to a post on the Microsoft TechNet Forums I wrote the following script to report the last modified date for all sites within a site collection using the Get-SPSite and Get-SPWeb PowerShell cmdlets. $SiteCollection = Get-SPSite https://yoursite.yourdomain.local ForEach($Site in…
SharePoint 2013 – URL mappings for Host Named Site Collections
The only way to add a URL mapping to a Host Named Site Collection is by using PowerShell and the Set-SPSiteURL cmdlet. Below is an example of how to add a URL to an existing site collection: $Site = Get-SPSite ‘https://intranet.webbworld.local’…

Moving a site collection between content databases (SharePoint 2013 using PowerShell
I have created a new site collection within a SharePoint 2013 web application and want it to use a new content database. After creating the new content database using the New-SPContentDatabase cmdlet I used the Move-SPSite cmdlet: Move-SPSite <URL> –DestinationDatabase…