Categories
SharePoint

Log into SharePoint 2013 as a different user

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

Categories
SharePoint

User Profile Synchronization Service Will Not Start

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.

Categories
Server

Trouble Shooting SharePoint Errors

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
Categories
Server

Synching Event Categories Between Outlook and SharePoint

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.

Categories
SharePoint

Adding Hours to a SharePoint Date Column

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.

Categories
SharePoint

Tuning SQL Server 2012 for SharePoint 2013 Jump Start

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

Categories
SharePoint

SharePoint: Move-SPUser

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"
Categories
Server

Upload a .STP Template File

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()
Categories
Server

Sharing permissions for Authenticated Users

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.

Categories
Server

“Access Denied”

Every so often I receive a helpdesk call from a user who, although their account is a member of the SharePoint site’s Owners, Members or Visitors group, is still presented with the generic “Access Denied” page when they attempt to visit the site.

After a bit of Googling, I found this post that seemed to have the answer.

The trick is to flush the user’s access permissions and recreate them. This can be done by:

  1. Remove the user’s account from the SharePoint group.
  2. Add the account into the Site Collection Administrators group (Site Actions > Site Settings > Site collection administrators).
  3. Remove the account from the Site Collection Administrators group.
  4. Add the account back into the original SharePoint group.

Seems to do the trick!

Update: 4 September 2013

If the above fails to work, you can also try completely removing the user’s profile from the Site Collection.

  1. Open an existing group, e.g. Owners. Its web address will be along the lines of http://domain/_layouts/people.aspx?MembershipGroupID=4.
  2. Change the value for the MembershipGroupId parameter to 0.  This should display the People and Groups – All People list.
  3. Locate and delete the troublesome user from the list (Actions > Delete Users from Site Collection).
  4. Add the deleted user back into the necessary group.