What site template did that SharePoint site start as?

Sometimes you need to figure out what template was used when creating a SharePoint site,  you can mess about in the database (not recommended) you can look in the HTML of an output page as long as your master page has not changed some of the default options or you can open up the SharePoint management shell and use the following.

$web = Get-SPWeb -Identity "http://SharePointSiteURL"
$Template = $web.WebTemplate
$Template = $Template + "#"
$SiteTemplate = $Template + $web.WebTemplateID
 
Write-Host $SiteTemplate

Move that SharePoint SubSite into its own site collection.

So it seemed like a good idea at the time, all of the sites on the root site collection but now you are beginning to regret that the content database is getting a little on the large side and managing the security is getting to be a pain.

So how do you move this subsite into it’s own site collection?

You can go ahead and pick up a migration tool from ShareGate of Metalogix both very good tools but you only want to move the site, feel free to grab this PowerShell script that will do it for you.

All you need to do is change the “script options” to reflect your needs and you should be away.

Remember that you use this script at your own risk and  you should backup ad test everything before you commit to running it.

The script can run the commands or build a script for you to use at a later date, your choice just look at the $debug  & $execute  options.

Download file : ConvertSubSiteToSiteCollection as a text file

 

Finding that SharePoint Correlation ID

So you have an issue in SharePoint and a screenshot form a user in a production environment.

You have asked the production support team to put SharePoint log viewer onto the server and they have submitted the request to the change group and will get back to you in a couple of days and in the mean time your user is going up the wall.

So you have the Correlation ID and need to find out what is going on, you can use the Get-SPEventLog cmdlet and filter things but remembering the syntax is more that you can do after the day you are having.

Feel free to grab this script that you can put on the server pass the Correlation ID to it along with some other things and you will have the information you are looking for to help you get to the bottom of the problem.

Download file: GetSPError as a text file

Examples of usage:

GetSPError.ps1 -GUIDToFind 00000000-0000-0000-0000-000000000000 -NumberOfMinutes 10
This will only look in the last 10 minutes of the log.

GetSPError.ps1 -GUIDToFind 00000000-0000-0000-0000-000000000000 -NumberOfMinutes 0
This will look at all of the the log.

GetSPError.ps1 -GUIDToFind 00000000-0000-0000-0000-000000000000 -NumberOfMinutes 10 -FileName error.txt
This will only look in the last 10 minutes of the log and send the output to the error.txt file.

GetSPError.ps1 -GUIDToFind 00000000-0000-0000-0000-000000000000 -NumberOfMinutes 0 -FileName error.txt
This will look at all of the the log and send the output to the error.txt file.

Get-Help GetSPError.ps1
This will list the help for this file.