Wednesday, April 30, 2014

The filtering process could not be initialized. Verify that the file extension is a known type and is correct

On analyzing SharePoint search crawl logs, found many instances of the error: "The filtering process could not be initialized. Verify that the file extension is a known type and is correct"
The filtering process could not be initialized. Verify that the file extension is a known type and is correct
Root cause:
This is because, SharePoint server 2007 search crawler doesn't recognize Office 2010 file types (such as .docx, .pptx, .xlsx,etc).

Solution: Download and Install Office 2010 Filter pack from http://www.microsoft.com/en-us/download/details.aspx?id=17062 to the Index server.
 
This filter pack installs few dlls and fixes the above issue. If you happen to see this error on PDF documents, make sure you have PDF IFilters installed and configured.


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


Wednesday, April 23, 2014

SharePoint 2013 Image Carousel (Rotating Banner) using Content Search Web Part

SharePoint 2013 brought an excellent web part to get content from search index, called "Content search web part". Using content search web part, We can build a simple image rotator or content slider in few steps.
Content Search Web part is available only on SharePoint 2013 enterprise edition!

Step 1 -  Create a Picture Library and upload images:
Go to your SharePoint site, Create new picture library.
 Give it a Name, Say "Slides"
 Upload required banner images to the library
Step 2: Trigger Incremental Crawl:
Trigger an incremental crawl or wait for the incremental crawl schedule to complete, So that the picture library we created added to search index.

Step 3: Add Content Search Web Part to the page
Navigate to the page where you would like to add content slider, Click on Site settings gear >> Edit page >> On Insert tab, Click on Web part >> Under the content Rollup, select "Content Search" and then click on "Add" button.
SharePoint 2013 how to add content search web part
Now, the web part should look like the below image. Click on "Edit Web Part" from the web part menu, content search web part sharepoint 2013
Click on "Change Query" button from the web part properties pane.
sharepoint 2013 slider
 Select a query as: Pictures (system) and Restrict by app as : Specify a URL. In URL field, enter the URL of your picture library and Click on OK.
sharepoint 2013 slider web part

Now, in Edit Properties, Set the Number of items to show as per your requirement, and expand Display templates section. Set the Control template as :Slideshow and Item template as Large picture.
sharepoint 2013 content search web part display templates
That's all! Done, This is what we get in the page!
sharepoint 2013 carousel

How to link banner Images to URLs?

Well, what we've done above is just a slideshow. On clicking banner images, they take us to the individual image from the banner. However, We may have to link banners to different URLs. Say, on clicking the above "New markets"banner, you may want to send users to :http://your-sites/departments/new-markets/ isn't it? So what this step brings in addition is: When user clicks on the banner, where it should takes them, Lets head on to the next step:
SharePoint 2013 generates managed properties for site columns. If you add a column directly to a list, it will not generate a managed property automatically!

Step 1: Add new Site column and Include it to the library
We need a column to hold target URL (when banner is clicked!), So lets create a new site column and add it to the Slides picture library. The reason we create site column, rather adding coloumn to the list directly is: We need a Managed property! Fortunately, in SharePoint 2013, all site columns will be automatically created as managed properties!

Navigate to "site action >> Site settings >> Site columns >> Create new site column "TargetURL"
 content search web part sharepoint 2013 tutorial
Add site column to the Library:
Go to list settings >> Add from existing site column >> and choose the site column "TargetURL".
Once done, update TargetURL value for all banner images. sharepoint 2013 content slider
Once done, Initiate either incremental/full crawl - This will create a new crawled property as well as managed property for the custom site column we've added to the picture library.


Verify the managed property: Go to : Site setttings >> search schema >> Managed properties.

Make sure, you get the Managed property listed.
sharepoint 2013 content search webpart slideshow
Now, configure the managed property in the content search web part properties. Go to Edit page, Modify web part, And set the "Link URL" value to the managed property created from our custom column (TargetURL).
sharepoint 2013 content search web part picture url
That's all! Now the banner images will be pointing to the URLs specified in TargetURL column!

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


Monday, April 21, 2014

Manage Mysite Promoted Sites in SharePoint 2013

As the name indicates, SharePoint 2013 promoted sites provides a way to list important sites to the user community. These promoted sites appear under "Sites" section of user's My site.
For promoted sites to work, we need user profile service application up and running(Obviously, we need SharePoint server at least, as UPA is not available in foundation version!)

How to manage promoted sites in SharePoint 2013?
Farm Administrators can manage these "Promoted Sites" via user profile service application. Here is how to manage promoted sites in SharePoint 2013: Say, we promote a training site.
  • Navigate to Central Administration >> Go to your User profile service application via service application link
  • Click on "Manage Promoted Sites" link under "My Sites Settings"sharepoint 2013 promoted sites
  • Click on "New Link" 
  • Fill the details of your new promoted sitesharepoint 2013 mysite promoted sites
That's all. Now, when users click on "Sites" link from suite bar, they'll get the promoted site listed.
sharepoint 2013 manage promoted sites


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


Change Content Type of Existing Items in SharePoint using PowerShell

Requirement:
We've an existing document library with 100's of Sales proposal documents in it. To enforce standardization, sales team created a content type "Sales Proposal". We got a requirement to change content type of all existing documents stored in a particular document library with the default content type "Document". In other words, All the documents now need to be assigned a new content type "Sales Proposal".

How to change content type of existing Items (documents) in SharePoint?
You can change the content type of the existing items by getting into edit properties page of the particular item and switching "Content Type" field.
sharepoint powershell change item content type
While its relatively easy and straightforward to change content type of existing items in SharePoint, you do not want to go through each and every single document in the document library and manually assign the new content type to it, as it will be time consuming, isn't it?

Well, let us use PowerShell to make it quick and easy! This script iterates through all documents stored in the given document library, checks for the content type of each document and if it is a specific content type , it  replaces old content type with the new content type.
Before running this script, Add your new content type to your library first! Find my script: Add Content Type to SharePoint Library using PowerShell

PowerShell script to change item content type in SharePoint
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Custom PowerShell Function to switch Content type of all items stored in a SharePoint library
Function Change-ItemContentType {
    param(
        [Microsoft.SharePoint.SPWeb]$Web = $(throw "Please provide the 'Web' Parameter!"),
        [string]$ListName = $(throw "Please provide the 'ListName' Parameter!"),
        [string]$OldContentTypeName = $(throw "Please provide the 'OldContentTypeName' Parameter!"),
        [string]$NewContentTypeName = $(throw "Please provide the 'NewContentTypeName' Parameter!")
    )    
 
    #Get the list
    $List = $Web.Lists[$ListName]

    #Get the new content type
    $NewContentType = $List.ContentTypes[$NewContentTypeName]
 
    #Checkin any checked out file 
    foreach($item in $list.Items)
    {
        if($item.File.CheckOutStatus -ne "None")
        {
            #check file in            
            $item.File.CheckIn("Checked In By Administrator") 
            write-host "Checked-out file checked-in on item: "$item.id
        }
    }

    #Iterate through each item in the list 
    foreach($item in $list.Items)
    {
        if($item.ContentType.Name -eq $OldContentTypeName)
        {        
            #Change the content type
            $item.File.CheckOut()
            $item["ContentTypeId"] = $NewContentType.Id
            $item.SystemUpdate()
            $item.File.CheckIn("Content type changed to " + $NewContentType.Name, 1)
            Write-host "Content type changed for item: "$item.id
        }
    }
}

#Variables for processing
$WebURL ="http://sales.crescent.com"
$ListName ="Q1 Sales Proposals"
$ContentTypeName ="Sales Proposal"

#Get the Web and List
$Web = Get-SPWeb $WebURL
$List = $Web.lists.TryGetList($ListName)

if($list -ne $null)
{
    #Call the function to add content type
    Change-ItemContentType $web $list "document" "Sales Proposal"
}
This will change the old content type "document" of all documents to a new content type 'Sales Proposal'. Next time, when users edits the documents, they'll be prompted to enter required fields from the new content type.

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


Thursday, April 17, 2014

Copy Users from One SharePoint Group to Another using PowerShell

Recently, I had a requirement to copy users from one SharePoint group to another group. Unfortunately, SharePoint doesn't support nested groups. Simply renaming the group didn't help us! Well, There is no direct way to copy users from one group to another, but without having to retype each user IDs, you can use this trick to save time in copy-move SharePoint users:
  • Go to Site Actions >> Site Settings
  • Click on "People and Groups" under Users and Permissions group
  • Pick required users from the source group. Click on "E-mail Users" from "Actions" menu.
  • This launches the default E-mail client such as Outlook. Now you can copy those IDs.
  • Head-on to the Target SharePoint group >> Add users and paste those copied IDs.
The above method could be relatively simpler when you have to copy or move few users between SharePoint groups. Wouldn't it be better to use the scripted way to copy multiple users in bulk?

PowerShell Script to Copy/Move Users from One SharePoint Group to Another :
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Input variables
$WebURL = "http://sharepoint.crescent.com/sites/Operations/"
$SourceGroupName="Operations Members"
$TargetGroupName="Operations Owners"

#Get the Web
$web = Get-SPWeb $WebURL

#Get the Source and Target Groups
$SourceGroup = $web.groups | where {$_.name -eq $SourceGroupName }
$TargetGroup = $web.groups | where {$_.name -eq $TargetGroupName }

#Iterate through each users in the source group
foreach ($user in $SourceGroup.users)
{
   $TargetGroup.AddUser($user)
    Write-Host "Copied $user from $SourceGroup to $TargetGroup"
    #To move users, Just remove them from source group
    #$SourceGroup.RemoveUser($user)
}

Copy users from one SharePoint site collection to another using PowerShell:
The above script copies users between SharePoint groups of the same site. Can we copy users between groups in different site collections? Why not? Lets change the above script slightly to copy users from one SharePoint site group to another.
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Input variables
$SourceWebURL = "http://sharepoint.crescent.com/sites/Operations/"
$TargetWebURL = "http://sharepoint.crescent.com/sites/Marketing/"
$SourceGroupName="Operations Members"
$TargetGroupName="Marketing Members"

#Get the Webs
$SourceWeb = Get-SPWeb $SourceWebURL
$TargetWebURL= Get-SPWeb $TargetWebURL

#Get the Source and Target Groups
$SourceGroup = $SourceWeb.groups | where {$_.name -eq $SourceGroupName }
$TargetGroup = $TargetWebURL.groups | where {$_.name -eq $TargetGroupName }

#Iterate through each users in the source group
foreach ($user in $SourceGroup.users)
{
   $TargetGroup.AddUser($user)
    Write-Host "Copied $user from $SourceGroup to $TargetGroup"
    #To move users, Just remove them from source group
    #$SourceGroup.RemoveUser($user)
}


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


Wednesday, April 16, 2014

“The server could not complete your request” Error in SharePoint Designer

All of a sudden, SharePoint designer 2013 started giving error message "The server could not complete your request. For more specific information, click the Details button" when tried opening SharePoint 2013 sites. I've experienced this error with SharePoint 2010 sites also.
“The server could not complete your request"
First and foremost, check your server's event log for potential clues!

Here are some solutions to solve this error:

1. Make sure Anonymous authentication provider is enabled in IIS:
  • Open IIS manager, ( Start >> Run >> Type: inetmgr)
  • Find your web application in IIS Manager
  • Open “Authentication” module from body panel
  • Make sure "Anonymous Authentication" is enabled.
Also repeat the above steps for "SharePoint Web Services" in IIS. KB: http://support.microsoft.com/kb/2758431

2. Is your server running out of Memory (RAM)?:
Monitor your Server memory load from Task manager, either increase server memory (RAM) or Try reducing the load by stopping unnecessary services and applications. (SharePoint Search host controller is a good candidate to restart!)

Here is one such clue I found in the event log:
WebHost failed to process a request.
 Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/4684807
 Exception: System.ServiceModel.ServiceActivationException: The service '/_vti_bin/client.svc' cannot be activated due to an exception during compilation.  The exception message is: Memory gates checking failed because the free memory (816398336 bytes) is less than 5% of total memory.  As a result, the service will not be available for incoming requests.  To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.. ---> System.InsufficientMemoryException: Memory gates checking failed because the free memory (816398336 bytes) is less than 5% of total memory.  As a result, the service will not be available for incoming requests.  To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.
   at System.ServiceModel.Activation.ServiceMemoryGates.Check(Int32 minFreeMemoryPercentage, Boolean throwOnLowMemory, UInt64& availableMemoryBytes)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CheckMemoryCloseIdleServices(EventTraceActivity eventTraceActivity)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)
   --- End of inner exception stack trace ---
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)
   at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath, EventTraceActivity eventTraceActivity)
 Process Name: w3wp
 Process ID: 13920

3. Try Recycling Application Pool / Try IISReset:
Open IIS manager >> Application pools >> Pick the corresponding application pool for your web application >> Right click >> Choose Recycle the application pool

4. Custom web parts may cause this error:
It happens when your Home page has some errored web parts. Open the home page in web part maintenance mode (by appending ?contents=1 to the URL) and remove the errored web part.

5. Is there multiple binding for your web application?
In your Web site's bindings make sure there is only one binding per protocol in IIS(i.e. one for HTTP, one for HTTPS)

6. Check your web.config file:
Make sure in your web.config, This entry exists:
  <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
  </system.serviceModel>

7. Getting this error while modifying SharePoint 2010 workflows?
If you are getting this error while trying to copy and modify any OOTB workflows (such as Collect Signatures Workflow) , do it from Root site instead of doing it from a sub-site. This is by design!

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


Get List Items from SharePoint View in PowerShell

PowerShell script example to get list items from a SharePoint view:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Variables
$SiteUrl="http://intranet.crescent.com" 
$ListName = "Invoice"
$ViewName = "2014 Invoice"

#Get Web and List objects
$web = Get-SPWeb $SiteURL
$list = $web.Lists[$ListName]

#Get the View
$view = $list.Views[$ViewName]

#Get All Items from the View
$items = $list.GetItems($view)

foreach($item in $items)
{
    write-host $item["Title"]
}


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


Monday, April 14, 2014

Add New Item to Link List in SharePoint using PowerShell

Here is my PowerShell script to add new item to SharePoint link list:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Custom Function to add new item to SharePoint link list
Function Add-LinkListItem($WebURL, $ListName, $LinkURL, $LinkTitle)
{
    try
    {
        $ErrorActionPreference ="Stop" 

        #Get the Web
        $Web = Get-SPWeb $WebURL

        #Get the link list
        $List = $web.lists[$ListName]
        
        #Create a new item
        $NewItem = $list.Items.Add()
 
        #Add properties to this list item
        $NewItem["URL"] = "$($LinkURL), $($LinkTitle)"

        #Update the object so it gets saved to the list
        $NewItem.Update()
        
        write-host “New Item has been Added to the List!"-foregroundcolor Green
    }
    catch [System.SystemException]
    {
        write-host "New Item Creation failed due to:" $_.Exception.Message -foregroundcolor Red
    }
    finally
    {
        #Dispose web object
        $web.Dispose()
        $ErrorActionPreference ="Continue" 
    }
}

#Call the function to Add new list item
Add-LinkListItem "http://sharepoint.crescent.com/" "Quick Links" "http://intranet.crescent.com" "Crescent Intranet"
and the output:
Add New Item to SharePoint Link list with PowerShell




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


Create SharePoint Link List using PowerShell

PowerShell script to create Link list in SharePoint:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

Function Create-LinkList($WebURL, $ListName, $ListDescription)
{
    try
    {
        $ErrorActionPreference ="Stop" 

        #Get the Web
        $Web = Get-SPWeb $WebURL

        #Get link list template
        $LinkListTemplate = [Microsoft.SharePoint.SPListTemplateType]::Links
        
        #Create link list
        $web.Lists.Add($ListName,$ListDescription,$LinkListTemplate)

        write-host “New List has been created!"-foregroundcolor Green
    }
    catch [System.SystemException]
    {
        write-host "List Creation failed due to:" $_.Exception.Message -foregroundcolor Red
    }
    finally
    {
        #Dispose web object
        $web.Dispose()
        $ErrorActionPreference ="Continue" 
    }
}

#Call the function to create Link lisst
 Create-LinkList "http://sharepoint.creswcent.com/" "Quick Links" "List of frequently accessed sites" 


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


Add stsadm to Path Environment Variable in SharePoint Servers

STSADM is still alive in SharePoint 2013 and in some cases we need to run this command line tool! We've to add STSADM.EXE file's location to "Path" environment variable in SharePoint servers, in order to access stsadm anywhere from command lines and from batch files. Failed to do so will result in error "'stsadm' is not recognized as an internal or external command, operable program or batch file." or we'll have to specify its full path every time we run this tool.
stsadm' is not recognized as an internal or external command
How to add stsadm to "Path" variable in SharePoint 2013
To access stsadm anywhere, we'll have to add stsadm command line tool's location to "Path" environment variable in Windows server. Navigate to:
  • Control Panel >> System and Security >> System >> Advanced System Settings (Shortcut: sysdm.cpl)
  • Advanced >> Environment Variables >> Under "System" variables Click on "Path" and "Edit"
  • Append the path of STSADM.exe folder location with this "path" variable. stsadm default path: C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\BIN
Add stsadm to Path Environment Variable

PowerShell script to add STSADM to Path variable in SharePoint
Now, the PowerShell way! How to add STSADM to path variable using PowerShell?
#STSADM Folder location in SharePoint 2013
$STSADMPath = "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\BIN"

#Get the current environment variable
$PathVariable = [Environment]::GetEnvironmentVariable("Path","Machine")

#Get each folder in Path variable:
$PathFolders = $PathVariable.Split(";")

#Check if the STSADM folder already exists in "PATH" Variable
if ($PathFolders.Contains($STSADMPath))
{
 Write-Host "STSADM Folder already exists in PATH variable!"
}
else #Add to PATH variable
{
    #Frame Path variable by appending STSADM 
    if($PathVariable.Trim().EndsWith(";"))
    {
        $PathVariable = $PathVariable + $STSADMPath
    }
    else
    {
        $PathVariable = $PathVariable +";"+ $STSADMPath
    } 

    #Add STSADM Folder to path to variable
 [System.Environment]::SetEnvironmentVariable("Path", $PathVariable, "Machine")

    write-host "Path environment variable updated with STSADM..."
}

Related post: Set STSADM path in SharePoint 2007, SharePoint 2010

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


Thursday, April 10, 2014

Create Custom Promoted Link Tiles in SharePoint 2013

Promoted links list is one of the new list type (App) introduced out of the box in SharePoint 2013, Its actually a list with a special view which shows the list items as tiles. Here is an example of a SharePoint 2013 team site with promoted links  Metro UI.
promoted links sharepoint 2013
Obviously, We can create our own Tiles like the one in "Get Started with your site", that is shown on all new team sites in SharePoint 2013. Lets create a Promoted Links as a Quick Navigation on a SharePoint support site's Home Page.

In Short, create a new Promoted Links list and add links that you need to display as tiles. Then add the Promoted Links App on a page to display links as Tiles.
Step 1: Create New Promoted Links List:
  1. To begin creating a Promoted Links list, Click on Site Settings Gear >> Choose "Add an app" linkadd promoted links sharepoint 2013
  2. Click on "Promoted Links" App list typepromoted links app sharepoint 2013
  3. You will be prompted for a list name. In my case, Its "Support Links"sharepoint 2013 promoted links feature
  4. Once you have created the Promoted Links, You can add links to the list by providing values such as: Link title, Description, Background Image Location(complete path of any existing image store anywhere - The tiles are 150px by 150px), Image Tool tip, Link behavior (Open link in a separate window), Order ( The lowest number will be the first tile). In my case, I've added links such as "Add New Site", "Request for Expert Help", etc.
    edit promoted links in sharepoint 2013
Edit promoted links in SharePoint 2013: Change the Tiles view to All Promoted Links view to edit Promoted Links! Otherwise, You can't edit them!!

Step 2: Add the Promoted Links List App to the Home page
Once you added all the required link items, you have to add this App to the page wherver required (typically on Home page!).  You can remove the above tile using remove this link and create your own tiles
  1. Navigate to the page where you where you want to add your tiles. Click on "Edit page"
  2. Click on Insert tab >> App Part
  3. Select the promoted links list (in my case its "Support Links") and click on add button to add it to the page.
  4. Save the page once done.

This is how my tiles view looks like:




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


Monday, April 7, 2014

SharePoint 2013 Change Site Logo Programmatically with PowerShell

We can change SharePoint 2013 site logo by going to : Site Settings >> "Title, Description, and Logo" from SharePoint web user interface:
sharepoint powershell change site logo
Now, Lets change logo for all sites in a site collection through PowerShell to save some time.

SharePoint 2013 change site logo programmatically using PowerShell:
Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue

#Web URL to update Logo 
$WebURL = "http://sharepoint.crescent.com/sites/operations/us/"

#Get the Web
$Web = Get-SPWeb $WebURL

$web.SiteLogoUrl = "/_layouts/15/images/sharepoint-diary-logo.png"  #can be from any library too: "/sites/operations/images/Corp-Logo.png"
$web.Update()

Write-host "Logo updated for :"$WebURL
This script changes logo programmatically for a single site.

You can copy the logo file to your each WFE, so that the logo will be retrieved from file system rather from a SharePoint library. The "Images" virtual folder is mapped with "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\IMAGES" in the file system.

Make sure your logo file is accessible by everyone. Users must have read access at least! and it should be approved (if content approvals is ON. Checked-in and published too!). Otherwise, your users may end-up continuous authentication prompts without page loading, when accessing SharePoint sites!

SharePoint 2010 update logo URL using PowerShell for a Site collection:
Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue

$SiteURL = "http://Your-Site-Collection-URL"

#Get the site collection
$Site = Get-SPSite $SiteURL

 #Iterate through each site in the site collection 
 foreach($web in $Site.AllWebs)
   {   
       #sharepoint change logo programmatically 
       $web.SiteLogoUrl = "/relative-path-logo-file" 
       $web.Update()
   } 
This script makes the change in logo for all sites in SharePoint 2010 (or SharePoint 2013).
sharepoint powershell change site logo

SharePoint PowerShell Change Site logo for All sites in a Web Application: 
Lets change logo for entire web application in one liner:
#sharepoint 2010/2013 change logo for all sites 

Get-SPWebApplication "http://sharepoint.crescent.com" | Get-SPSite -Limit "All" | Get-SPWeb -Limit "All" |  foreach { $_.SiteLogoUrl=""; $_.update(); Write-host "Changing Logo for:"$_.Url;  }
All of these scripts are valid for SharePoint 2010 also!

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


SharePoint 2013 Links List Open in New Window

I explored various methods to make SharePoint link list to open in a new window at: SharePoint Link list: Open in a New Window, While the methods discussed in the article are applicable for SharePoint 2013 too, there is a one more: using calculated columns! Lets drill down in detail with SharePoint 2013 to make links to open in new window.

Here is the idea: Create a new custom list and make these changes to the list.
  1. Rename "Title" field to "Link Title"
  2. Add a field "Link URL" of single line of text
  3. Add a field "New Window" of choice with "Yes", "No"
    SharePoint 2013 Links List Open in New Window
  4. Add a calculated field of "Number" type with formula:
    =CONCATENATE("<DIV><a href='",[Link URL],IF([New Window]="Yes","' target='_blank' ","'"),">",[Link Title],"</a></DIV>")
Now, the list should look like:

So now, When you add new entries to SharePoint list, set the choice field to "Yes" to make SharePoint 2013 link list open in new tab.
SharePoint 2013 open link in new tab
BTW, the above method of opening SharePoint 2013 links list to new window works on any version of SharePoint!

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


Wednesday, April 2, 2014

"New Folder" Option Missing/Disabled in SharePoint List/Library?

So in your SharePoint 2007 List or library not getting "New Folder" option ? or the "New Folder" ribbon button is disabled in SharePoint 2013 or in SharePoint 2010? Well, Here is the fix: Go to
  • List/Library  Settings >> Advanced Settings 
  • Make sure the "Display 'New Folder' command on New menu?" option is marked "Yes".
  • Click on "Save" to commit your changes.
Same thing goes with SharePoint 2010 and SharePoint 2013 also. 
New Folder button disabled in sharepoint 2010, 2013
Why Still New Folder is disabled in SharePoint 2007/2010/2013?
You enabled the above option to make "New Folder" enabled, but still "New Folder" button is disabled? Well, in addition to the above settings, There is one more thing to look at is: View Settings!! Head-in to view settings, If the option to show items without folders, then the "New Folder" button will be disabled in SharePoint!
new folder disabled in sharepoint
Just make it to "Show Items inside folders" to get New Folder option in SharePoint.

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


Fix for SharePoint 2013 Drag and Drop Upload Not Working Issue

One of the cool new feature in SharePoint 2013 is the ability to drag and drop files directly into document libraries.  We had a scenario where it didn't work!  some users were unable to upload files into document libraries by dragging and dropping. They see only "New document" but "new document or drag files here" not visible. Which means: drag and drop not available for them!
drag and drop in sharepoint 2013 not working

SharePoint 2013 drag and drop requirements:
SharePoint 2013 drag and drop feature in based on HTML 5! So, the browsers which supports HTML 5, such as recent versions of IE 10 or above, Firefox, Chrome and Safari, drag and drop functionality in SharePoint 2013 works fine.

This functionality also works on browsers which doesn't support HTML 5 (such as IE 8 and IE9), when you have Microsoft Office 2013 installed. Office 2013 installs an activeX control "SharePoint DragUpload Control (Interceptor.dll) and browsers use them for drag-and-drop functionality. BTW, Check the version compatibility (If you have 32 bit version of office installed, It can't run on IE 64 bit!!)
sharepoint 2013 drag and drop browser support
Enable drag and drop feature in SharePoint 2013 for IE8/IE9:
As already stated, SharePoint 2013 drag and drop not available for IE8/IE9 when you don't have Microsoft Office installed on client machine. So, We can run SharePoint designer 2013 installer (Just choose "Office Tools >> Microsoft SharePoint Foundation Support" option, No need to install SPD 2013!) Having SharePoint Designer 2013 enables uses to drag and drop documents in SharePoint 2013.
How about libraries with required columns? Well, when you upload by drag and drop, The file is checked-out and they'll have to check-in explicitly.

SharePoint 2013 drag and drop upload permissions:
user must have at least contribute permission to the document library, otherwise, they can't drag and drop in SharePoint 2013. Also, drag and drop functionality doesn't work for sub-folders. You can drag and drop only FILES. Use Explorer view to upload files along with folders!
What if none of the above works for you? Use Explorer view!


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...