2015 in review

The WordPress.com stats helper monkeys prepared a 2015 annual report for this blog.

Here’s an excerpt:

A New York City subway train holds 1,200 people. This blog was viewed about 4,600 times in 2015. If it were a NYC subway train, it would take about 4 trips to carry that many people.

Click here to see the complete report.

SharePoint 2013: Tweaking the Health Analyzer Rule Definitions

For all those SharePoint Server administrators out there, I’m pretty sure you would have noticed the warnings which you see in the SharePoint Health Analyzer and would have come up with ideas/fix to get rid of them. Now, it’s ok to ignore these errors in a development or test environment but not in a Production environment.

Being SharePoint admin’s we all know that most of the errors which we see in the Health Analyzer are not really scary and they have nothing to do with the farm’s performance. I think it would be really great if we could find a way to get rid of those errors as you really don’t want to be warned about these errors in the first place. So the main goal of this article is to show you how to do that in SharePoint Server 2013.

Imagine a scenario where your SharePoint farms are being audited for Compliance and you don’t want these nasty errors showing up in CA, then this is what you probably need to do ….

Note: It would be really worthwhile to do a research on all the alerts and identify the root cause of it and make sure it’s not really scary and then implement these steps. Do not directly implement this on any rule without having a proper understanding about that rule.

Also, please not the errors which you see in the Health analyzer are driven by a Timer job which runs on the background and hence deleting a rule by using the “delete” button will not really help .Once the next timer job for the corresponding rule kicks off the alerts will be back in place.

Now, let’s take a look at the steps …..

  1. To modify the rule definitions, select Site Contents from the settings menu (gear) in Central Admin–>Locate the Health Analyzer Rule Definitions library as shown in the image below.

HA 1

2.Open the library and select a rule you wish to modify:

HA 2

3. Click Edit Item from the top ribbon:

HA 3

4. You may now modify the scope, schedule, enabled, and repair automatically properties:

HA 4

Here are some tweaks I have made which may go against best practices but can be explained.

Let’s take the “Drives are running out of free space” rule as an example. Now if you want to know about this rule, please go through this link below …

https://vigneshsharepointthoughts.com/2015/12/15/dealing-with-drives-are-running-out-of-free-space-sharepoint-health-analyzer-alert/

Once you have gone through the above link you would have understood that this rule is not really scary and can be ignored. So in order to ignore an alert you have to go ahead and disable it. .Also taking a look at the screenshot below you would have noticed that there is already a rule that warns of drives actually running out of disk space. I don’t need to be warned about the risk. This alert was occurring against the C: drive of our servers however there is plenty of free space and since we keep our logs on E: there shouldn’t be any worry. The threshold here deals with the amount of memory on the server and having enough room for logs and memory dump files. I think we are safe and hence we can go ahead and disable it.

HA 10

In order to disable it, please perform these steps mentioned below ….

  1. Choose the rule which you want to disable and click on the edit button in the top ribbon interface and uncheck the “enabled” checkbox and save it.

HA 6

2. Do the same for both the rules corresponding to “Disk space” .Disable both the alerts. Once done this is how the status of the both the alerts will look like ( see screenshot below )

HA 7

3. Finally I deleted these alerts from the list of health analyzer alerts as well in CA and the next timer job didn’t bring it back.

SharePoint 2013 External FIM Issue-Missing manager property:

The User Profile Synchronization service is the core of the synchronization architecture in SharePoint Server 2013. When you start the User Profile Synchronization service on the synchronization server, SharePoint Server 2013 provisions a version of Microsoft Forefront Identity Manager (FIM) to participate in synchronization. A User Profile service application can only have one User Profile Synchronization service. A User Profile Synchronization service is associated with connections and mappings.

upsa 1

So that being said we are going to talk about an issue with the missing manager field in the SharePoint user profiles. This is something new which we observed in our environment and we happened to work with our PFE to fix this. I’m really not sure whether most SharePoint admin’s are aware of this issue, if not then you really need to take a look at this article below.

By any chance if you’re using an External FIM deployment to push your user profile information to SharePoint 2013, then you would have likely come across this issue. In our environment all was well with pushing the user profiles from FIM to SharePoint except the “manager” field wasn’t getting populated, even though FIM was synching it correctly. After working with our PFE and the FIM engineer, we solved this one.

So in a nutshell the issue which we are trying to fix here is the missing manager field which doesn’t get populated in the SharePoint user profiles when you’re using FIM to push the profiles.

You can take a look at how this is set up in your environment by going to Central Admin–>User Profile service application –>Configure Synchronization settings.

upsa 2

Fix:

Open your ULS log, and look for an entry that looks like this as shown in the screenshot below.

upsa 3

What this means is that we’re getting a null reference exception, when the FIM management agent/connector for SharePoint finishes up. It calls a finalize method that’s part of the web service.

This finalize method is checking for a running instance of the “User Profile AD Import Timer Job “. The problem is that this timer job only gets created if your UPSA configuration settings is set to use the “Active Directory Import” option. Please check the screenshot below.

upsa 4

If you never use/set that setting, which you probably don’t because you’re trying to use your External FIM deployment, the Timer Job will never exist. To create the timer job, all you need to do is change the setting in your UPSA’s “Configure Synchronization Settings” page to “Active Directory Import” and then to back “External FIM” . This won’t break anything.

Also in addition to that make sure you’re disabling the “User Profile Active Directory Import Job “

upsa 5

You will notice this timer job the moment you change the synchronization settings from “External FIM” to “Active Directory Import”.

You can also use PowerShell for this:

$upsa = Get-SPServiceApplication -name “YOUR_UPSA_NAME”
$upsa.NoILMUsed = $true
$upsa.Update()
$upsa.NoILMUsed = $false
$upsa.Update()

Once this is done, after you run your next FIM full sync, the Finalize method will run, and kick off what it needs to. It may take a few minutes, so please be patient. To confirm the finalize method has run, you can examine your user profiles to ensure the manager field is now present, and also look for entries similar to this in the ULS logs.

upsa 7

SharePoint User Profile delete script:

I happened to work on a project where I’m supposed to delete all the user profiles in a SharePoint farm as we were having some problem with the FIM sync to SharePoint. Since we didn’t find much time to troubleshoot the issue we planned to delete all the user profiles from the farm and then do a complete FIM full sync.

Now, I had two options in my mind to do this,

  1. Finding a script which can do this for us.
  2. Deleting the User profile Service application completely and rebuilding it from the scratch.

Obviously the latter one is not a good choice and hence we decided to go with the script.

Things to consider before running the script:

  1. Make sure you’re running this script by logging into the SharePoint server using the farm admin account.
  2. Make sure the account running this script has enough permissions on the User profile service application ( Central Admin–>Manage service applications–>User profile service application –>Check whether the account running this script has been added to the administrators group as well to the “permissions” section in the top ribbon interface and has been given full control as well )
  3. Please remember that this script will only be deleting the user profiles tied to the user accounts in the SharePoint farm and not the account themselves.

#Input parameters:

  1. Mention the “My site “host site collection url
  2. Mention the do not delete setup admin account name ( your farm admin account )

Please find the command below:

#Add SharePoint PowerShell SnapIn if not already added

if ((Get-PSSnapin “Microsoft.SharePoint.PowerShell” -ErrorAction SilentlyContinue) -eq $null) {

Add-PSSnapin “Microsoft.SharePoint.PowerShell”

}

$site = new-object Microsoft.SharePoint.SPSite(“http://skvkfm-it01/”);

$ServiceContext =[Microsoft.SharePoint.SPServiceContext]::GetContext($site);

#Get UserProfileManager from the My Site Host Site context

$ProfileManager = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($ServiceContext)

$AllProfiles = $ProfileManager.GetEnumerator()

 

foreach($profile in $AllProfiles)

{

$DisplayName = $profile.DisplayName

$AccountName = $profile[[Microsoft.Office.Server.UserProfiles.PropertyConstants]::AccountName].Value

#Do not delete setup (admin) account from user profiles. Please enter the account name below

if($AccountName -ne “Domain\MySiteSVApp”)

{

$ProfileManager.RemoveUserProfile($AccountName);

write-host “Profile for account “, $AccountName, ” has been deleted”

}

 

}

write-host “Finished.”

$site.Dispose()

Ref : _ You can find the script here :

https://gallery.technet.microsoft.com/office/Delete-all-User-Profiles-fa4e1428

 

 

 

 

 

 

 

 

Dealing with “Drives are running out of free space” SharePoint Health Analyzer alert:

If you’re one among those guys who manages the SharePoint servers in your firm then I’m pretty sure that you would have noticed this error (i.e. Drives are running out of free space) in the SharePoint health analyzer. Now this post is meant for those SharePoint admins who have noticed this error in the health analyzer and is wandering what to do with it.

To view this alert, please perform the below mentioned steps …

  1. Clicking on either ‘View these issues’ from the main Central Admin page or clicking ‘Review problems and solutions’ takes you to the issue report page and from here you can see a list of all of the health rules that have fired and are showing alerts

error 1

2. Clicking on the alert in question will take you to the details of the alert as shown below.

error 2

3. There are couple of things which you need to take a look at in the above screenshot ….Few to point out are the Severity and Explanation. The Severity notes this alert as an Error. Some health rules will different levels of reporting. The Disk Space rule currently has two levels – Warning and Error. The Explanation field includes information such as the Server and specific logical disk which is being reported as a problem.

4. This alert can have two categories depending upon the severity level, please check below to understand about that.

Error:

This rule checks disk space as a proportion of the RAM on the computer. When disk space is less than twice the RAM on the computer, the health rule triggers an error.

Warning:

When disk space is less than five times the RAM on the computer, the health rule triggers a warning. Accordingly, server computers with lots of RAM are more likely to experience a failure of this rule.

Ref: _ https://technet.microsoft.com/en-us/library/ff805057(v=office.14).aspx

The other item to understand about how this rule works is that it will run this health analysis on EVERY logical disk on the server that is online and defined as a fixed disk (no network drives). What that means -and was the case for this customer- is that even data drives such as a tools drive will be checked and reported if these disks do not have enough free space. The other thing that this means is that if you have a server with 32GB of memory this rule will fire a warning if every disk on the server does not have more than 160GB of free space!

How to tackle this alert?

  1. Understand what the rule uses as criteria and ignore the alerts that are unimportant.
  2. Disable this alert and create a custom health rule that analyzes the desired disks (maybe a configurable option?)
  3. Disable this alert and use SCOM (Microsoft System Center Operations Manager) to monitor the desired disk space of the SharePoint servers.

Machine Translation Service in SharePoint Server 2013

This article is intended for those who are new to SharePoint 2013 and would like to have a basic understanding about the “Machine Translation Service” which was introduced in SharePoint 2013.

Note: I have not discussed about configuring the Machine Translation service here, it’s just a simple explanation about what this service is all about and how it can add value for the business.

Introduction:

SharePoint Server 2013 introduces several new service applications; among them is the new Machine Translation Service. Machine Translation Service is a new service application in SharePoint 2013 that provides automatic machine translation of files and sites. When the Machine Translation Service application processes a translation request, it forwards the request to the Microsoft Translator cloud-hosted machine translation service, where the actual translation work is performed. The content can be pre-translated when required, or translated on the go by users.

The Translation process takes place in two ways:

  1. Asynchronously
  2. Synchronously or Streaming

Machine Translation Services provides machine translation; machine translation is the use of software to translate text from one natural language such as English to another, such as German basically substituting one word in one natural language to its corresponding word in another (see illustration below)

Translation 1

Translation 2

The actual translation process here is performed by a cloud –hosted machine translation service called Microsoft Translator.

Asynchronous Translation Process:

Asynchronous translation requests are processed when the translation timer job executes. The default interval of the translation timer job is 15 minutes; you can manage this setting in Central Administration or by using Windows PowerShell. You can also set the timer to execute immediately using the following command:

$job = Get-SPTimerJob “SharePoint Translation Services”

$job.Runnow()

Synchronous Translation Process:

Synchronous translation requests are processed as soon as they are submitted.

Provisioning and Configuring Machine Translation Service in SharePoint Server 2013:

Prerequisites:

  1. To provision and configure the Machine Translation Service your environment must meet the following minimum requirements:
  2. The App Management Service is started.
  3. Server-to-server and app authentication is configured.
  4. The User Profile Service Application Proxy must be in the Default Proxy Group and the User Profile Service provisioned and configured.
  5. Internet connectivity is available.

Please go through the below mentioned TechNet article to learn how to configure Machine Translation service in your environment:

https://technet.microsoft.com/en-us/library/jj553772(v=office.15).aspx

 

 

 

 

App Fabric 1.1 CU 7 is out

Microsoft has released CU 7 for App Fabric 1.1 .Please find the link below . Its always recommended  to keep your AppFabric deployments associated with SharePoint 2013 on a recent patch.

https://support.microsoft.com/en-us/kb/3092423

As you all know , patching App Fabric is important for Distributed cache to work fine and also for the social features in My site .

Issue with SharePoint 2013 latest CU’s: 

The October, November and December 2015 CUs have a regression in them that causes outbound query federation with Office 365 to stop working.This would be corrected in the January 2016 CU .

“This update will cause outbound query federation to stop working. Outbound query federation returns federated results to SharePoint Server 2013 Search services when SharePoint Server 2013 Search services query the SharePoint Online search index. This issue will be fixed by the January, 12, 2016, cumulative update for SharePoint Server 2013.”

 

Web Analytics in SharePoint Server 2013

In SharePoint 2013, the analytics engine has been completely revamped and has been given much more importance than the previous version of SharePoint. As you all know for yourself “Web Analytics” is no more a separate component as it did in SharePoint 2010. Web Analytics has become a component of Search Service in SharePoint 2013.  Things like views, click distance, social tags and social distance are all things we’re used to with search engines and social networking sites and will now be part of SharePoint 2013’s new arsenal.

Activating Web analytics on a site collection in SharePoint Server 2013:

Web Analytics can be turned on a site collection by using the “Reporting” site collection feature.

To do this:

  1. Go to site settings
  2. Under Site collection administration
  3. Go to site collection features
  4. Activate the “Reporting” site collection feature.

Analytics 1

5. This would do two things , i) Turn-on the “Popularity and Search Reports” option under Site collection administration and ii) Turn-on the “Popularity Trends” option under site administration(please check the image below ) .

6. If you turn-off this feature then you will not see both these options in site settings.

analytics 2

Lets take a look on each of them now :

Popularity and Search Reports:

Once you click on “Popularity search reports” you will get to a window where you can view the “Usage reports” and “Search reports”.

analytics 3

Clicking on these reports will generate an excel file and you will see a graphical representation of the data in the report.

Note: This report will have data only after you turn on this feature and the site has some activity going on. You won’t see any data on this report if you have just activated the “reporting “feature or if the site hasn’t been used by anyone.

This how the report will look like (please see image below) .It gives you a daily view as well as a monthly view.

analytics 4

Popularity Trends:

Clicking on “Popularity Trends” will give you a usage report which has historical usage information about the site, such as the number of views and unique users. Use this report to identify usage trends and to determine times of high and low activity.

Note:  This report will have data only after you turn on this feature and the site has some activity going on. You won’t see any data on this report if you have just activated the “reporting “feature or if the site hasn’t been used by anyone.

You will get a report as shown below when you click on “Popularity Trends” under Site Administration.

analytics 5

 

Most Popular Items:

Besides reports, the analytics also integrates with search results.  One example of this is the “Most Popular Items” functionality which allows you to generate search results sorted on different popularity criteria.  To access this functionality within a document library, click the “Most Popular Items” button in the ribbon:

analytics 6

Once you click this button, you’ll get search results for the document library which you can view by:

  1. Most viewed
  2. Most viewed by unique users
  3. Most recommendation clicks (based on usage patterns)

analytics 7

Note:  If you have access to the “Search-Driven Content” Web Parts (enterprise, on-premise), you can use the “Popular Items” Web Part to show the results on a different page.  All this is, is a pre-configured “Content by Search” Web Part.

Important Powershell commands for configuring Office webs apps in SharePoint 2013

Office-Web-Apps-Server-2013---die-neue-Architektur

 

1.New-OfficeWebAppsFarm –> This command is used to create a new Office Web Apps Server farm on the local computer.

The New-OfficeWebAppsFarm cmdlet creates a new Office Web Apps Server farm on the local computer. You have to run this cmdlet on the first server in the Office Web Apps Server farm and then add more servers to the farm by using the New-OfficeWebAppsMachine cmdlet.

Syntax:

New-OfficeWebAppsFarm -InternalUrl “https://server.corp.contoso.com” -ExternalUrl “https://server.external.contoso.com” -EditingEnabled:$true -SSLOffloaded

This example creates an Office Web Apps Server farm on the local server that has editing enabled for Office Web Apps. The farm is configured for load balancing by enablingSSLOffloaded, which automatically enables AllowHttp. If you are not using a load balancer, make sure that you set Certificate Name.

Syntax using the certificate name:

New-OfficeWebAppsFarm -InternalUrl “https://server.corp.contoso.com” –CertificateName “Web OWA” -EditingEnabled

2. New-OfficeWebAppsMachine –> The New-OfficeWebAppsMachine cmdlet adds the current server to an existing Office Web Apps Server farm and optionally sets one or more roles on the new server.

Syntax:

New-OfficeWebAppsMachine -MachineToJoin server1.contoso.com

The “MachineToJoin” switch takes care of adding the new machine to the Office Web apps farm

3. Remove-OfficeWebAppsMachine –>   This command removes the current server from the Office Web Apps Server farm. As part of this process, the cmdlet removes the web applications and shuts down the services that are related to Office Web Apps Server. This command can be used during scenarios where you’re planning to patch the  current Office web apps server. Do remember that you’re supposed to remove the OWA server which you’re planning to patch from the OWA farm and once you’re done patching you have to add it back.

Note: This is applicable only when you have OWA running as a farm with many servers on it .

4. New-SPWOPIBinding –> This command associates file name extensions or applications to actions on the current SharePoint farm where this cmdlet is run. Each binding allows you to use the WOPI application to view or edit files in your SharePoint library. For example, when a user sees a Word document in a SharePoint document list, the SharePoint list will display the available options to view or edit the document based on the actions that are bound to Word on that SharePoint farm.

Syntax:

New-SPWOPIBinding -ServerName “Server.corp.Contoso.com” :  This example creates bindings for all the applications and file name extensions that the WOPI application supports on the current SharePoint farm where this cmdlet is run.

New-SPWOPIBinding -ServerName “Server.corp.Contoso.com” -Application “Excel” :  This command associates Excel with all the actions that the WOPI application supports for Excel on the current SharePoint farm where this cmdlet is run.

5. Remove-SPWOPIBinding –> This command is used to remove all the bindings for applications, file name extensions, and their associated actions on the current SharePoint farm where this cmdlet is run

Syntax:

Remove-SPWOPIBinding -All:$true –> This example removes all bindings on the current SharePoint farm where this cmdlet is run.

Remove-SPWOPIBinding -Application “Excel” –> for excel alone.

Get-SPWOPIBinding -Action “MobileView” | Remove-SPWOPIBinding –> This example removes all bindings for Office Mobile Web Apps on the current SharePoint farm where this cmdlet is run.

6. Get-SPWOPIBinding –> This command returns a list of bindings that were created by using New-SPWOPIBinding on the current SharePoint farm where this cmdlet is run

Syntax:

Get-SPWOPIBinding -Server “Server.corp.Contoso.com” :  This example returns a list of bindings that were created on the current SharePoint farm where this cmdlet is run for the WOPI application “Server.corp.Contoso.com.”  The WOPI application may be the server that runs Office Web Apps Server.

Get-SPWOPIZone | Get-SPWOPIBinding :  This example returns a list of bindings that were created on the current SharePoint farm where this cmdlet is run for the zone configured for the WOPI application.

7. Set-SPWOPIBinding — > This command Updates the default click action for an application or file name extension binding.  The Set-SPWOPIBinding cmdlet updates the default click action for an application or file name extension binding. For example, you can set the default click action for viewing a Word document in a SharePoint library. To do this, you set the default action to true for the “view”-“Word” bindings

Syntax:

Get-SPWOPIBinding -Action “view” -Application “Word”| Set-SPWOPIBinding -DefaultAction –> This example sets the default click action to view for a Word document in a SharePoint library. You can verify that the default click action is set to view for Word by running the cmdlet Get-SPWOPIBinding –Action “view” –Application “Word”. The IsDefaultAction value is set to “True.”

8. New-SPWOPISuppressionSetting –> This command turns off Office Web Apps for the action, file name extension, or programmatic identifier that you’ve specified on the current SharePoint farm.

Syntax:

New-SPWOPISuppressionSetting -Extension “XLSX” -Action “view” &

New-SPWOPISuppressionSetting -Extension “XLS” -Action “view”

This example turns off the ability of a user to use Office Web Apps to view Excel workbooks that have file name extensions “.xlsx” or “.xls”.