Mainstream support for SharePoint & Project Server 2013 will end in 4 months

Hi!

Yes, you’ve read it well, mainstream support for SharePoint 2013 will end on April 10th of 2018, after this date only security fixes will be provided for SharePoint 2013. Regular hotfixes in case some bugs have been detected can no longer be requested.

support.png

*Image extracted from: https://support.microsoft.com/en-us/lifecycle/search?alpha=sharepoint%202013

If you haven’t already planned to migrate  to SharePoint 2016, this announce should change your mind.

This is not the only thing to consider after this date: starting with April 10th, 2018 the required patch level to request support for SharePoint 2013 will also change.

Currently all patch levels starting with SharePoint 2013 SP1 are supported. Starting with April 10th, 2018 this will change. In order to request support from Microsoft after April 10th, 2018 the SharePoint server farm has be on a patch level of April 2017 CU or later. A year later, after April 10th, 2019, the SharePoint server farm has be on a patch level of April 2018 CU or later.

This change is outlined in the Updated Product Servicing Policy for SharePoint 2013 published on TechNet.

So keep in mind this piece of advice and update or migrate your current farm!! 😉

Advertisement

Set Item level user permissions to add/edit/read only own items

In a recent project with SharePoint 2016, I needed to configure a library with the following user requirement: The users only have to view, their own items.

By default, this option it is not available in Library settings, it is only available for List settings, so… what we can do for a Library? You guessed right, PowerShell.

To do it, we can follow the following process:

You can also use s PowerShell script to manage the item level permissions:

Manage Read Access
$web = Get-SPWeb http://urlsite/
$list = $web.Lists[“Library Name”]
$list.ReadSecurity = 2
$list.Update()
$web.Dispose()

Note: 1 = “Read all items”, 2 = “Read items that were created by the user”

Manage Write Access
$web = Get-SPWeb http://url site/
$list = $web.Lists[“Library Name”]
$list.WriteSecurity = 2
$list.Update()
$web.Dispose()

Note: 1 = “Create and edit All items”, 2 = “Create items and edit items that were created by the user” 4 = “None”

Hope that helps!

Disable MySite “Let’s get social” dialog

By default, when you open the MySite SC for the first time, you will receive this dialog:

image_thumb[3].png

So, probably under your unknow of SharePoint, you will press “Okay”, but what you don’t know is that pressing that “Okay”, changes the privacy of all your social activities to “everyone”, and also send you an email. So probably, most of users don’t want to share their activities, but what we can do to solve this? PowerShell of course:

$web = get-SPWeb http://urlmysitehost
$web.Properties[“urn:schemas-microsoft-com:sharepoint:portal:profile:SPS-O15FirstRunExperience”]=”OFF”
$web.Update()

Hope that helps!

SharePoint 2013 Newsfeed – We’re still collecting the latest news error

When you’re doing some content migration between environments, or even if you’re trying to stop services to reallocate them in other servers, you have probably seen this error message on your SharePoint 2013 MySite Newsfeed:
“We’re still collecting the latest news. You may see more if you try again a little later.”

I have face off this problem many times, and then I realize that I needed to write it down the solution to try to not to forget it and get a quick solution to that problem.
This problem is related with the Distributed Cache of the servers, why? One reason could be that someone has rebooted all the distributed cache services at the same time. Once you face this problem, you have two possible actions: wait (nobody loves waiting) or use PowerShell to refill the Distributed Cache.

Use-CacheCluster
Get-CacheHost
#Replace URL with your mysite URL. This script will populate each user’s cache using
Update-SPRepopulateMicroblogFeedCache
#The following line will populate and the entire user profile newsfeed cache
Update-SPRepopulateMicroblogLMTCache.
$proxy = Get-SPServiceApplicationProxy | ? {$_.Name –like “User Profile Service Application*”}
Update-SPRepopulateMicroblogLMTCache -ProfileServiceApplicationProxy $proxy
[System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.Office.Server”)
[System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.Office.Server.UserProfiles”)
$url = “http://mysiteurl.domain.com“
$contextWeb = New-Object Microsoft.SharePoint.SPSite($url);
$ServerContext = [Microsoft.Office.Server.ServerContext]::GetContext($contextWeb)
$UserProfileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($ServerContext);
$Profiles = $UserProfileManager.GetEnumerator();
foreach ($oUser in $Profiles ) {
if ($oUser.item(“SPS-PersonalSiteCapabilities”).Value -eq 14 ){
$personalurl = $url + $oUser.item(“personalspace”).Value
Write-Host $oUser.item(“AccountName”).Value
Update-SPRepopulateMicroblogFeedCache -ProfileServiceApplicationProxy $proxy -accountname $oUser.item(“AccountName”).Value

}
}
$contextWeb.Dispose()

After running the script on each WFE where distributed cache runs, wait 15 minutes for the Newsfeed data to populate. Finally, test newsfeed

References:

http://consulting.risualblogs.com/blog/2014/04/01/export-impor-distributed-cache-configuration-in-sharepoint-2013/
http://sharepoint.stackexchange.com/questions/125798/userprofileapplicationnotavailableexception-logging-userprofileapplicationpro
http://netwovenblogs.com/2014/03/11/the-newsfeed-is-not-working-on-mysite-in-sharepoint-2013/

File Shares as Content Source in SharePoint 2013 On Premises

Hi all!

Another quick post about file shares and SharePoint:

  1. Identify your crawl account, because this account will be used to index the file share (unless specified differently with a crawl rule), so it is necessary to have read access to the file share to this account
  2. If crawled files in file share system contain metadata, this will be used by the search refiners in SharePoint
  3. Security trimming is respected, so when end users search the document in the search site, it will be displayed according to the permissions given on the files and folders.
  4. Only metadata of the documents will be stored in SharePoint, not the documents
  5. It is not possible to get a preview from Office documents that are stored in File Shares, to get a preview, you’ll need to use third party tools.

That’s all!

How to replicate a SharePoint farm

Hi!

The other day I found this interesting article from Nik Charlebois, he talks about how to automate a replicate farm of SharePoint, this farm can be used as development farm or even Test farm.

What he is explaining in the article, is how can we retrieve all the information from our SharePoint 2013/2016 farm by PowerShell (he wrote a PS1 to do that) and collect all this information to create a series of PowerShell codes.

Once this information has been retrieved, is it possible to replicate your environment to another location on-premises.

Hope it helps!

 

Disable Mobile view

In case you need to disable the mobile view in all your SharePoint Sites, the following code can be used:

$sites = get-spwebapplication http://mss2013be | Get-spsite -limit ALL
foreach ($site in $sites) {
foreach ($web in $site.AllWebs) {

Disable-SPFeature -identity d95c97f3-e528-4da2-ae9f-32b3535fbb59 -URL $Web.URL -Force -Confirm:$false
write-host "Feature desactivada en el sitio: $($Web.Url)"
}
}

A similar code can be used for SharePoint Online, in this case will change the way how you connect to SPO and how you deactivate the feature from SPO, in this case the command is: Disable-SPOFeature

Enjoy!

How to Disable “Open with Explorer” View

Hi!

In a project we got a requirement to hide the “Open with explorer view” from the ribbon, this can be done by PowerShell by creating a custom action in the library/list

The following code will be used to hide the action from the ribbon:

$sites = get-spwebapplication http://yourwebappurl | Get-spsite -limit ALL
foreach ($site in $sites) {
foreach ($web in $site.AllWebs) {
foreach ($list in $web.Lists) {
$CustomAction = $list.UserCustomActions.Add()
$CustomAction.Title = "Hide Explorer View"
$CustomAction.Location = "CommandUI.Ribbon"
$CustomAction.commandUIExtension = "
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition Location='Ribbon.Library.Actions.OpenWithExplorer' />
</CommandUIDefinitions>
</CommandUIExtension>"
$CustomAction.Update();
}
}
}

After the code has been executed, the action will disappear from the ribbon.

If you need to recover the action from the ribbon, the following PowerShell can be used for this:

$CustomActionTitle = "Hide Explorer View"
$sites = get-spwebapplication http://yoururlwebapp | Get-spsite -limit ALL
foreach ($site in $sites) {
foreach ($web in $site.AllWebs) {
foreach ($list in $web.Lists) {
$CustomAction = $list.UserCustomActions | where {$_.title -eq $CustomActionTitle}

#Delete the custom action from list
if ($CustomAction)
{
    $CustomAction.Delete()
}
}
}
}

That’s all!

Ref.http://www.sharepointdiary.com/2015/03/how-to-disable-open-with-explorer-view-in-sharepoint-2013.html

Enable Session State in SharePoint

Hi all!

The other day I was configuring a serie of apps for SharePoint, but when we tried to access to them, we were receiving the following error:

Application error when access /_layouts/15/custom.aspx, Error=Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the \ section in the application configuration. at System.Web.UI.Page.get_Session() at…

So what happen here? By default the session state will not be enabled on the SharePoint Environment. To make our Provider Hosted App work properly, we need to enable the Session State.

So what we need to do is to change the web.config of the SharePoint web app:

<system.web>

<pages enableSessionState=”true” />

</system.web>

For our surprise, doing this was not enough, so we needed to execute the following PowerShell to enable the session at Farm Level:

Enable-SPSessionStateService -DefaultProvision

Lastly, we started the ASP.Net State Service en in Windows CMD Services. After following all this steps, we were able to continue with our applications.

Error on manage user properties page–your search encountered an error

Hi all!

A colleague, told me that he was facing an strange error in when he tried to modify some user properties in a SharePoint Server 2013 – he got the following message “Your search encountered an error. If the problem persists, contact the portal site administrator”

Firstly, I checked search but I saw no errors in there – it seems that the error description is not really guiding you in the correct direction. The solution was as simply as starting the ForeFront Identity Manager Service in the services CMD.

Cheers!