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!

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 hide the Timeline in Task List

Hi! Do you need to hide the timeline in your task list? Then this is your post 🙂

As you will know, by default you have the following view of the Task list:

t1

But, if I want to remove the timeline, what I have to do? Pretty simple…

 

  • Go to the Task List, Click on List Tab and then click on “Modify View” button from the ribbon.
  • In the Edit view page, scroll down and expand the ‘Style’ section.
  • Under the Style selection, Uncheck the checkbox ‘Show timeline above the view’

t2And then… click ok to save changes, the result will be like the following:

t3.PNG

Hope that helps!!

 

Run IISReset on All Servers in your farm at the same time

In case you have a large number of servers in a farm, the following script will help you to do a iisreset in all servers at the same time:

#Specify servers in an array variable
[array]$servers = “Server1″,”Server2″,….”

#Step through each server in the array and perform an IISRESET
foreach ($server in $servers)
{
Write-Host “Restarting IIS on server $server…”
IISRESET $server /noforce
Write-Host “IIS status for server $server”
IISRESET $server /status
}
Write-Host IIS has been restarted on all servers

Till next time!

Exceeding list view threshold

Hi folks,

Recently in a project where we need to work with large lists, as you will know, in SharePoint, lists with more than 5000 items causes problems to the users, and lists with more than 20k items are not possible to manage by the admins, in that cases you will receive a problem like:

“The view can not be displayed because it exceeds the list view threshold(5000 items) enforced be the administrator”

But if you look into the logs, you’ll see the following:

Microsoft.SharePoint.SPQueryThrottledException: The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator. —> System.Runtime.InteropServices.COMException: The attempted operation is prohibited because

In this case, it was a news list, so it was not possible to order the list in folders or any other method to avoid the item threshold limitation. What is the problem? This issue is By Design, so the throttling limit is enforced to protect the SharePoint Server, why? because each time we access to that list we make a SQL query as the number of items that this list has, so in case that this query exceeds 5000 items (by default) this action is avoided.

As you’ll know, it is possible to change this limit, but you’ll change this limit to the entire web app, which is not recommended, so why we can do as a workaround? Disable throttling 🙂 But you have to take into account that disabling throttling will cause performance issues on the SharePoint Server or the SQL Server.

$web= get-spweb “url”
$list=$web.lists[“listname”]
$list.enablethrottling = $false
$list.update()

After doing this, you’ll query more items in that list 🙂

hope that helps!