SharePoint Discussion Board Quick Edit is disabled

One of the thing that you will notice that working with SharePoint Discussion Board you do not have ability to edit items using the Quick Edit. Based on my research Quick Edit option is only available when you have Standard View on your list. Since Discussion Board does not have Standard View Quick Edit option is disabled.

Doing research on this I came across this MSDN forums where the workaround was mentioned as using a PowerShell to enable Quick Edit on your Discussion Board list.

https://social.technet.microsoft.com/Forums/sharepoint/en-US/b5a74681-ba88-43e2-b406-82d25fa38b25/quick-edit-greyed-out-in-custom-list

$web = Get-SPWeb “YOUR WEB URL”
$list = $web.Lists.TryGetList(“YOUR DISCUSSION LIST”)
$list.DisableGridEditing = $false
$list.Update()

I have tried this on my development environment and it seems to be working but just word of caution, I am not sure if this method of enabling Quick Edit is supported.

So if you are using this approach I would advise you to validate if this is supported by Microsoft.

Get Site Collection properties using PowerShell – SharePoint 2013

Today I am just going to blog about how to get certain information about site collections to which SharePoint Administrators might not have access to. This question comes up quite often on SharePoint forums.

If you are looking to get information for the site collection or want to generate report on site collection properties then your best friend is Get-SPSiteAdministration cmdlet. This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you may not combine parameters from different parameter sets.

If you want to learn how to use parameters sets then follow the link below.

https://msdn.microsoft.com/library/dd878348(VS.85).aspx

For example if you would like to list primary site collection administrator and secondary site collection administrator then you would use something like,

Get-SPSiteAdministration -identity SITECOLLECTIONURL -Limit ALL | Select -Property OwnerDisplayName, SecondaryContactDisplayName

Here is the list of all the properties that you can get using this cmdlet.

https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spsiteadministration_properties.aspx

Similar to this there is Set-SPSiteAdministration cmdlet which can be used to set different properties for the site collections.

Cannot find s4-ribbonrow in oslo master page

Today’s post is quick how to when working with SharePoint Online Master page.

When working with SharePoint Online oslo master page, you will find that usual way of hiding gear icon would not work i.e. you will not find the div for s4-ribbonrow. Seattle.master still has that.

Reason for that is because Oslo and Seattle are different master page. You can read about the difference in the following blog post.

There’s more than meets the eye: Differences between SharePoint’s Oslo and Seattle master pages

Coming back to hiding the gear icon you can target the button ID to hide it.

Either in your CSS or Script Editor web part add the following Style.

<style>#O365_MainLink_Settings{ display:none;}</style>

Where O365_MainLink_Settings is the ID of Settings button.

I hope this helps someone.

SharePoint Saturday – New York 2016

Last week, I was at New York speaking at SharePoint Saturday NYC. It was pretty exciting to see more than 600 user attending SharePoint Saturday NYC and also gave me chance to meet many of my speaker friends. The event was at Microsoft office in New York.


I would like to thank everyone who attended my session. I presented on creating SharePoint 2016 farm on Microsoft Azure using Azure Resource Manager (ARM).

http://lanyrd.com/2016/spsnyc/sfbzpz/
It is always amazing to speak at SharePoint Saturday New York since it is one of the biggest SharePoint community event with over 500 attendees every year.

Kudos to all the organisors, sponsors and volunteers for successful event!!!

I look forward to speaking in next year’s SharePoint Saturday NYC.

PowerShell – Querying User Profile Service Application – SharePoint Server 2013

This blog is quick way to show you how you can query your user profile service application for specific user. It is always easy to find user by using the UserName but in case where you do not have username available but the display name available e.g. someone giving you excel file to load data in SharePoint list.

In that case you can use the following script to query the user profile service application using the display name.

Here is the script.

 

Add-PSSnapin microsoft.sharepoint.powershell

$site = Get-SPSite "http://intranet.contoso.com/"

$web = $site.OpenWeb();

$context = Get-SPServiceContext $site;

$profileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($context);   

$searchPattern = “USER DISPLAY NAME”;   

$searchResults = $profileManager.Search($searchPattern);

foreach($result in $searchResults)
{
    write-host $result.AccountName;
}

 

SharePoint randomly not displaying JPG images

Today when working at a client site I ran into weird issue. Some of the sites that are using JPG images were not getting displayed in Internet Explorer. Instead of images it was showing the image not found icon i.e. X.

When I started debugging first thing I did was to open the page in Chrome and it worked just fine so that told me right away that the issue is related to browser support.

Quick research on this issue and I was able to figure out the issue.

So the issue was with the image itself. When you have .jpg image it could be in one of the two formats i.e. CMYK or RGB. Internet Explorer dropped CMYK support starting Internet Explorer 8.0. So when you have JPG image with CMYK format then it will not work in Internet Explorer 8.0 or higher.

To fix this simply open this image into image editor and change the format to RGB. If you do not have the image editor then simply open the Paint and save the image again as JPG and Paint will save it RGB format. After that you can upload it to SharePoint and it should work just fine.

 

I hope this helps someone with the same issue.