Wednesday, March 8, 2017

Fix "Unfortunately, help seems to be broken...There aren't any help collections in the current language for the site you're using." Error in SharePoint 2016

Problem: The Help Menu (?) in SharePoint 2016 is not working! On clicking the Help menu, it gets the error message:
"Unfortunately, help seems to be broken... There aren't any help collections in the current language for the site you're using."
Unfortunately, help seems to be broken... There aren't any help collections in the current language for the site you're using.

Troubleshooting Steps: 
  • Enable External Web-based Help in Privacy Options of SharePoint 2016 Central Admin. Navigate to : http://central-admin-url/_admin/privacy.aspx, and Set "Yes" to "Display Help from external web Sites as specified by each Help collection?"
  • Check the help collection status and install if needed: Open SharePoint 2016 Management Shell, Run:
    Get-SPHelpCollection 

    It gave nothing. Guess help collection is not installed. Now, Install help collection by running:
    Install-SPHelpCollection -All 
wait for few minutes to get them installed (10 min!). Try close and reopen the SharePoint 2016 sites! Now, SharePoint 2016 help should work.



You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Wednesday, February 22, 2017

Rich Text Column in SharePoint Document Library

Problem:
Could not add rich text columns to SharePoint document library, Picture Library and other type of Libraries!

Little background: End user created in document library with type "Description" column as "Multiple lines of text"and expecting this column to is expecting to have the Rich text capability. so, tried editing the column, and found no option to update the type of this column as rich text!
rich text field in sharepoint document library
Troubleshooting:
When you add a Multiple lines of text field to custom list, announcement, tasks, etc, You'll find the Rich text and Enhanced rich text options.
rich text field in sharepoint 2013 document library
However on document libraries, these options seems missing! It just displays a Text area without any formatting! It seems you can't have a rich text column in a document library with SharePoint 2013. So, How do we create Rich Text column for a Document Library?
sharepoint document library rich text field
Solution:
While there are many options to get rich text field in SharePoint 2013 document library like: Custom field types, Content Types, etc, here is the easiest way:
  • Open the site in SharePoint designer, Go to List & Libraries, Click on your library
  • Click on Edit columns under Customization >> Double click on the column which you want enable Rich Text functionality >> select the checkbox which says Rich Text and hit OK and then Save.
sharepoint 2013 document library rich text column
This fixes the problem!

PowerShell way: Setting "RichText" property of the field to True makes SharePoint 2013 document library field rich text enabled!
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

$SiteURL = "http://intranet.crescent.com/"
$ListName="Documents"
$FieldName="Description" #Internal Name

$Web = Get-SPWeb $SiteURL
$List = $Web.Lists[$ListName]
$Field = $List.Fields[$FieldName]
$Field.RichText = $True
$Field.Update()
sharepoint 2013 document library rich text column
I know this issue exists in all SharePoint versions: Including SharePoint 2007, SharePoint 2010, SharePoint 2013 and even in SharePoint 2016! and Yes, It's weird and I'm not sure why Microsoft hasn't fixed this issue yet!

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Tuesday, February 14, 2017

Fix for SharePoint 2016 Project Templates Missing in Visual Studio 2015

Problem: SharePoint Project Templates are missing in Visual Studio 2015!
sharepoint project templates missing in visual studio
Solution:
We need to install "Microsoft Office Developer Tools for Visual Studio 2015" for SharePoint 2016 project templates in Visual Studio 2015.
Once installed, You should see SharePoint 2016 project templates in Visual Studio 2015!
sharepoint 2016 project templates missing in visual studio 2015


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Sunday, January 8, 2017

Get User Account By Display Name in SharePoint

Requirement: Get user by display name in SharePoint
We have a CSV file with list of projects and their Team leads information. This list to be updated on a SharePoint list. But the challenge is 'Team Lead' field has display names of users instead of account name (Domain\LoginID). So prior updating to SharePoint list, we need the Login ID of the user from his display name.

Solution: Lets Query Active directory for the given display name to get the user's Login ID.

Prerequisites: You need to have PowerShell module for Active directory installed to use: Import-Module ActiveDirectory! Use PowerShell cmdlet: Add-WindowsFeature RSAT-AD-PowerShell to add AD Module for PowerShell to your server/desktop! Otherwise, you'll get an error message: "Import-Module : The specified module 'ActiveDirectory' was not loaded because no valid module file was found in any module directory"

PowerShell script to get user accounts from display name and update SharePoint List:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
Import-Module ActiveDirectory

#Configuration Variables
$SiteURL = "http://intranet.crescent.com/"
$ListName = "Projects"                
$FieldName="Team Lead"
$CSVFile ="C:\TeamLeads.csv" 

#Custom Function Get User Account from Display Name in AD 
Function Get-UserAccount($DisplayName)
{
    $UserAccount=Get-ADUser -LDAPFilter "(displayName=$DisplayName)" | Select sAMAccountName
    if($UserAccount.sAMAccountName -ne $null)
    {
        return $UserAccount.sAMAccountName.tostring()
    }
    else
    {
        write-host $DisplayName not found in AD! -f Red
        return $null
    }
} 
#Import from CSV file - CSV has Headers ("ProjectName", "TeamLead")
$CSVData = Import-CSV -path $CSVFile

#Get the Target Web & List
$Web = Get-SPWeb -identity $WebURL
$List = $web.Lists[$ListName]
 
#Iterate through each Row in the CSV file
foreach ($Row in $CSVData) 
{
    #Filter by Project Name
 $Item = $List.Items | Where-Object { $_["Project Name"] -eq $Row.ProjectName }
  
 #If the matching project found
    If($Item -ne $null)
    {
  write-host "Searching for:"$Row.TeamLead
  #Get the User Account from Display Name
  $UserAccount = Get-UserAccount $Row.TeamLead
  
  #If User account found in AD
        if($UserAccount -ne $null)
        {
            $TeamLead=$web.ensureuser($UserAccount)
     
      #Update Team member field
   $item["Team Lead"] = $TeamLead
   $item.Update()
         Write-Host "Updated Project:"$Row.ProjectName -ForegroundColor Green
  }
  else
  {
   write-host "No matching User Account Found for :"$Row.TeamLead -f Red
  }
    }
    else
    {
        write-host "No matching List Item Found for:"$Row.ProjectName -f Red
    }  
}
Using SPUtility's ResolvePrincipal Method: Instead of querying Active directory, you can also use SPUtility's ResolvePrincipal method to get a user by display name:
$Web = Get-SPWeb "http://intranet.crescent.com"
$DisplayName="Barunx Romeih"
$Principal = [Microsoft.SharePoint.Utilities.SPUtility]::ResolvePrincipal($web, $DisplayName, "All", "All", $null, $false)
$Principal.LoginName


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Tuesday, December 20, 2016

Add Links to Resources List in SharePoint Central Administration

The Resources list in SharePoint Central Administration site lets you to keep frequently accessed links to the home page. Say for e.g. To access User profile service application, you'll have to navigate through:
  • Central Administration >> Application Management 
  • Manage Service Applications >> Search and pick your user profile service Application
in some other cases, you'll find a difficulty in navigating To-And-Fro in SharePoint Central Administration. So, Resources list comes handy to manage this hassle. Just add your frequently accessed links to it! When you log into SharePoint Central Administration site, you'll see the Resources link list in right pane.
Consider Resources list as your Favorites or Bookmarks List!
sharepoint 2013 central admin resources list
To Add a link/remove links in resources list:
  • Click on "Resources" link from SharePoint Central Admin home page (or your can Click the gear icon and click Site Contents >>  Find the Resources list)
  • From here you can add or delete the link like any list item.
    sharepoint 2013 add link to resources list in central admin
This saves time and effort, especially if you have trouble finding service applications in Central Admin.

Populate Resources List using PowerShell:
Lets use PowerShell to add items to Resources list in SharePoint Central Administration site.
Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue

#Get Central Administration Site
$CentralAdminUrl = Get-SPWebApplication -includecentraladministration | where {$_.IsAdministrationWebApplication} | Select -ExpandProperty URL

#Get Resources list from Central Admin
$List = (Get-SPWeb -identity $CentralAdminUrl).Lists["Resources"]

#Get Service Applications to add to Resources List
$ServiceApps = Get-SPServiceApplication | Where {($_.TypeName -eq "Excel Services Application") `
                                 -or ($_.TypeName -eq "Managed Metadata Service") `
                                 -or ($_.TypeName -eq "User Profile Service Application") `
                                 -or ($_.TypeName -eq "Search Service Application") `
                                 -or ($_.TypeName -eq "Business Data Connectivity Service Application") }

#Loop through and Add Links to Resources list
foreach ($App in $ServiceApps)
{
    $Item = $List.Items.Add()
    $Item["URL"] = "$($App.ManageLink.Url), $($App.DisplayName)"
    $Item.Update()
}

Write-Host "Service Application Links added to Resource List!" -f Green


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


You might also like:

Related Posts Plugin for WordPress, Blogger...