Posts tagged with "Microsoft SharePoint"

SharePoint 2013: Focus on Content

Posted within Development on by Cornflower Design

SharePoint 2013 has introduced a small Focus on Content icon to the ribbon bar which, for the MasterPages that support it, will show and hide portions of the page when clicked. This can be useful for hiding non-essential page elements.

When the icon is clicked, JavaScript will do two things:

  1. It creates a cookie, so the selection is remembered the next time the page is visited.
  2. It adds a new ms-fullscreenmode class to the page’s BODY tag.

So, via CSS, we can decide which elements of the page should be hidden via the Focus on Content functionality.

.ms-fullscreenmode #nonessentialcontent { display: none; }

Log into SharePoint 2013 as a different user

Posted within Administration on by Ryan Ball

The “Sign in as Different User” option that was present in SharePoint 2010 has now been removed for SharePoint 2013 (I assume because it caused a lot of confusion between Internet Explorer and Office if you were logged onto the PC under one account and into SharePoint as another).

You can get around this by visiting http://siteurl/_layouts/closeConnection.aspx?loginasanotheruser=true

Source: “Sign in as Different User” menu option is missing in SharePoint Server 2013

User Profile Synchronization Service Will Not Start

Posted within Administration on by Ryan Ball

Note to self: If a newly created User Profile Synchronization Service within SharePoint will not start…

  1. Confirm that the service account is a member of the Local Administrators group on the server.
  2. Restart the SharePoint Timer Service.

If in doubt, iisreset /noforce.

Trouble Shooting SharePoint Errors

Posted within Administration on by Ryan Ball

For viewing in command prompt:

Get-SPLogEvent | ?{$_.Correlation -eq "<GUID>"} | SELECT Area, Category, Level, EventID, Message | Format-List

Export the results as text file:

Get-SPLogEvent | ?{$_.Correlation -eq "<GUID>"} | SELECT Area, Category, Level, EventID, Message | Format-List > C:\Error.log

Results can be retrieved faster if the time span is limited:

Get-SPLogEvent -StartTime YYYY-MM-DDTHH:mm:ss | ?{$_.Correlation -eq "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"} | SELECT Area, Category, Level, EventID, Message | Format-List

Synching Event Categories Between Outlook and SharePoint

Posted within Administration on by Ryan Ball

Oddly, within SharePoint 2010 at least, when you connect a calendar to Outlook it will not synchronise the category information for the event. It seems that Outlook uses a field named Categories to store this information and SharePoint uses Category.

Although not ideal, we can resolve the issue by visiting the List Settings page for the calendar, opening the Event content type and adding Categories from the list of pre-existing columns.

Adding Hours to a SharePoint Date Column

Posted within Administration on by Ryan Ball

When working with calculated fields within SharePoint, there isn’t an inbuilt function that will allow you to add a specific number of hours to a date. You have to stop of a second and think about it – and the solution is quite simple.

While adding whole days is as simple as =[DateColumn]+5, to add hours you have to break things down. So to add eight hours…

=[DateColumn]+(1/24*8)

See this helpful blog post for more information.

Tuning SQL Server 2012 for SharePoint 2013 Jump Start

Posted within Administration on by Ryan Ball

SQL Server stores most of the data for SharePoint. This Jump Start training focuses on how these two products are integrated. Join two of the industry’s most popular SharePoint experts, Bill Baer and Brian Alderman on an exploration of SQL Server settings, SQL Server system database settings and configuration options that will improve SharePoint 2013 performance, availability and security. Enjoy this demo filled Jump Start to help you optimize SQL Server 2012 deployment to protect your SharePoint environment.

http://www.microsoftvirtualacademy.com/training-courses/tuning-sql-server-2012-for-sharepoint-2013-jump-start

SharePoint: Move-SPUser

Posted within Administration on by Ryan Ball

Another PowerShell command to note for future reference. Within my SharePoint farm there is often a need to migrate a user for one reason or another, e.g. their username may have changed. The Move-SPUser cmdlet migrates user access from one domain user account to another. If an entry for the new login name already exists, the entry is marked for deletion to make way for the migration.

Move-SPUser –Identity "DOMAIN\JaneDoe" –NewAlias "Domain\JaneSmith"

Upload a .STP Template File

Posted within Administration on by Ryan Ball

This is a quick way to programmatically upload a .STP template file within SharePoint using PowerShell – useful if you’re transferring list templates from a development to a live environment.

$web = Get-SPWeb "http://mydomain"
$folder = $web.GetFolder( "List Template Gallery" )
$files = $folder.Files
$file = Get-ChildItem "C:\MyListTemplate.stp"
$newfile = $files.Add( "_catalogs/lt/MyListTemplate.stp", $file.OpenRead(), $true )
$web.Dispose()

Sharing permissions for Authenticated Users

Posted within Administration on by Ryan Ball

Note to self: When setting permissions and sharing content stored within SharePoint 2013, Microsoft have now hidden the “All Authenticated Users” option that was present in 2010. To get around this, just type “NT AUTHORITY\AUTHENTICATED USERS” and click the Share button.