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…
Only allow sites to be created with SharePoint 2013 compatibility level
If you have a requirement to only allow sites within a web application to be created with a compatibility level of SharePoint 2013 then you can configure this using only a few PowerShell commands: $wa = Get-SPWebApplication http://portal.webbworld.local $wa.CompatibilityRange =…
Identify customisations to be installed when upgrading from SharePoint 2010 to SharePoint 2013
If you are planning to upgrade a SharePoint 2010 farm to a SharePoint 2013 farm you may need to identify the customisations that must be installed on the new farm. You can do this using stsadm.exe: stsadm.exe -o enumallwebs -includewebparts…
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’…
SharePoint 2013 – creating a host named site collection using PowerShell
The only way to create a Host Named Site Collection (HNSC) is using PowerShell and the New-SPSite cmdlet. Below is an example of how to do this: New-SPSite -URL “https://doc-centre.webbworld.local” -HostHeaderWebApplication “https://portal.webbworld.local” -Name “Doc Centre” -Description “WebbWorld Document Centre” -Template…
Configure continuous crawl on an existing content source
I’m working on a SharePoint farm where documents don’t appear in search results until the next day. To ensure they appear in search results within one hour of being uploaded I will configure a continuous crawl on the content source:…
Referencing a custom css file in a master page
For small customisations I will sometimes insert styles using a Script Editor web part, but the best way to apply custom style sheets is via the master page. Here’s how I do it: 1. Upload the custom .css file…
SharePoint 2013 – show the breadcrumbs
In SharePoint 2013 the breadcrumb has been hidden from the Seattle master page. If, like me, you miss this functionality and want to enable it again just follow these steps: 1. Launch SharePoint Designer 2013 and open your site 2….