kwizcom banner advertisement

Export SharePoint 2007 Search Crawl Log Errors using PowerShell

3:21 PM    , , , ,
Requirement: Found so many errors logged in the Search crawl log. Wanted to analyze them. So need them in CSV format. Solution: Lets use this PowerShell Script to export search crawl errors to CSV: #Load SharePoint Assemblies [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.Search") #Web Application URL $url = "http://sharepoint.crescent.com" $csID = 4 #Content source id - Local SharePoint sites #Objects to get Crawl History $site = new-Object Microsoft.SharePoint.SPSite($url); $context = [Microsoft.Office.Server.Search.Administration.SearchContext]::GetContext($site); $logViewer = new-object Microsoft.Office.Server.Search.Administration.logviewer ($context) $crawlLogFilters = New-Object Microsoft.Office.Server.Search.Administration.CrawlLogFilters $EndDate = [System.DateTime]::Now $StartDate=$endDate.AddDays(-1)
Export SharePoint 2007 Search Crawl Log Errors using PowerShell Export SharePoint 2007 Search Crawl Log Errors using PowerShell Reviewed by Salaudeen Rajack on 3:21 PM Rating: 5

How to Integrate Google Analytics with SharePoint 2013?

6:01 PM    , , , ,
Google Analytics is a popular free service for website analytics. Why don't we use Google analytics with our SharePoint sites? Here is how to add Google analytics to SharePoint 2013: Step 1: Sign-up & Get Google analytics Tracking code You need to have a Google analytics account to start with! Signup for the Google analytics account at: http://www.google.com/analytics/,  Login to Google analytics site, Navigate to "Admin" tab and setup new property for your web site by filling the farm, Click on "Get Tracking ID" button to generate  Google analytics tracking code for SharePoint. We need this tracking code to add google analytics to sharepoint site.  You'll get tracking code something like: Step 2: Edit Master page and Add Google analytics tracking code Next step is to add Google analytics to SharePoint master page. Edit your master page in 'Advanced mode' with SharePoint designer 2013 and insert this code just before </head> tag
How to Integrate Google Analytics with SharePoint 2013? How to Integrate Google Analytics with SharePoint 2013? Reviewed by Salaudeen Rajack on 6:01 PM Rating: 5

How to Create Redirect (URL Shortcut) to a Subsite in SharePoint?

3:33 PM    , , , , , ,
Requirement: We've a sub-site located at the URL - http://sharepoint.crescent.com/sites/marketing/regions/us/brandcenter/ and the requirement is to create a shortcut to this subsite. That is the URL shortcut: http://brandcenter.com should redirect to the above subsite. Solution: To redirect to a subsite in sharepoint, lets use IIS HTTP Redirect module. Follow these steps to redirect to subsite. Make sure HTTP Redirection module is installed before proceeding. If not, enable it from Server Manager! Step 1: Create necessary DNS entries for your new host name. To begin with, create DNS entries for your new host (in my case: http://brandcenter.com). It could be a HOST-A Record / Forward Lookup Zone / CNAME, etc based on your requirement. For testing purpose, you can make an entry in your HOST file (located at: C:\Windows\System32\drivers\etc) Step 2: Create New IIS Web Site: Go to IIS of your SharePoint Web front end server(s), Right click "Sites" node create
How to Create Redirect (URL Shortcut) to a Subsite in SharePoint? How to Create Redirect (URL Shortcut) to a Subsite in SharePoint? Reviewed by Salaudeen Rajack on 3:33 PM Rating: 5

Default View Missing - Incremental Search Crawl Stuck - Solution

6:40 PM    , , , ,
Problem: SharePoint incremental crawl stuck at a particular point of time - without changing the crawling status from: "Crawling Incremental". No progress in search crawl log. No new items included in search crawl. Root cause: Default view files / associations missing in some of the lists and libraries. When crawler crawls those lists and libraries it just stuck there! I tried browsing those lists and libraries from "View all Site content" page. Found those libraries were pointing to their settings page, instead of "AllItems.aspx"! Solution: Create a Default View using PowerShell: [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") #Get-SPWebApplication, Get-SPWeb cmdlets for MOSS 2007 Function global:Get-SPWebApplication($WebAppURL) { return [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup($WebAppURL) } Function global:Get-SPWeb($url) { $site= New-Object Microsoft.SharePoint.SPSite($url)
Default View Missing - Incremental Search Crawl Stuck - Solution Default View Missing - Incremental Search Crawl Stuck - Solution Reviewed by Salaudeen Rajack on 6:40 PM Rating: 5

Configure Self Service Site Creation in SharePoint 2013

11:10 AM    , , , ,
What is Self Service Site Creation in SharePoint? To create a new Site collection in SharePoint, Usually SharePoint Administrators use SharePoint Central Administration site or SharePoint Management Shell. Self-Service Site Creation feature enables end users to create site collections within a particular web application on their own. Self service site creation is not enabled by default. For "My Site" host web application, it should be enabled in order to provision SharePoint My Sites. In a project collaboration environment, We had a requirement to enable end-users to create their own Site collections without the help of a SharePoint administrators. How to enable self service site creation in SharePoint 2013: You can enable/disable SSC in these three ways: Using SharePoint central admin to configure Self service site creation in SharePoint 2013 Using PowerShell to enable self service site creation in SharePoint Using STSADM to enable self service site creation Us
Configure Self Service Site Creation in SharePoint 2013 Configure Self Service Site Creation in SharePoint 2013 Reviewed by Salaudeen Rajack on 11:10 AM Rating: 5

Upload Master Page to SharePoint using PowerShell

5:32 PM    , , , , ,
Requirement: We've a SharePoint 2013 master page from a third-party consultants and would like copy-apply the master page to SharePoint sites. PowerShell script to upload Master page to SharePoint: Add-PSSnapin microsoft.sharepoint.powershell -ErrorAction SilentlyContinue $WebURL = "https://intranet.crescent.com/" $MasterPage = "Crescentv1.master" $SourcePath ="D:\Branding\MasterPages\Crescentv1.master" #Get the Web $web = Get-SPWeb $WebURL #Get the Target folder - Master page Gallery $MasterPageList = $web.GetFolder("Master Page Gallery") #Set the Target file for Master page $TargetPath = $Web.Url + "/_catalogs/masterpage/Crescentv1.master" #Get the Master page from local disk $MasterPageFile = (Get-ChildItem $SourcePath).OpenRead() #Check if file exist already if ($Web.GetFile($TargetPath).Exists) { $Web.GetFile($TargetPath).recycle() } #upload master page using powershell $MasterPage = $MasterPageList.Files.Ad
Upload Master Page to SharePoint using PowerShell Upload Master Page to SharePoint using PowerShell Reviewed by Salaudeen Rajack on 5:32 PM Rating: 5

Storage Analysis Report for SharePoint Document Library

10:05 PM    , , ,
Requirement: On a very large document library, We needed to analyze all documents stored, in-order-to move documents into individual libraries/folders, as this larger library causing latency issues. Lets use PowerShell script to analyze and generate report on document library storage information: PowerShell script to generate storage metrics report on SharePoint library: #Get Size of all Sub-sites in a Site Collection [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") #For MOSS 2007 compatibility Function global:Get-SPWeb($url) { $site= New-Object Microsoft.SharePoint.SPSite($url) if($site -ne $null) { $web=$site.OpenWeb() } return $web } # Function to Get Storage Metrics for a Library Function GetStorageMetrics($Folder) { #Array to hold Storage data for all files $StorageDataCollection = @() foreach ($File in $Folder.Files) { #Get File Size $
Storage Analysis Report for SharePoint Document Library Storage Analysis Report for SharePoint Document Library Reviewed by Salaudeen Rajack on 10:05 PM Rating: 5

How to Hide Quick Launch Bar in SharePoint 2013?

6:55 PM    , , , , ,
How to hide SharePoint quick launch? Want to remove the quick launch from SharePoint 2013 sites, perhaps to see the home page in full width? How to hide quick launch in SharePoint 2013?  Well, to enable or disable Quick Launch through the SharePoint 2013 user interface, Go to: Site Settings >>  Under Look and Feel, click Tree view. To disable quick launch, Simply uncheck the "Display Quick Launch"check box. To enable it, just do the reverse. You can programmatically do the same with PowerShell as: $web.QuickLaunchEnabled = $false . But wait! Although unchecking the "Display Quick Launch" check box hides quick launch bar in SharePoint 2013, it leaves that space empty! So, lets seek help from CSS to hide quick launch SharePoint 2013. CSS to Hide quick launch in SharePoint 2013: Navigate to your SharePoint site >> Click on Edit the page from settings menu  Click on Insert >> Add a script editor web part to a page. Click EDIT SNIPPET an
How to Hide Quick Launch Bar in SharePoint 2013? How to Hide Quick Launch Bar in SharePoint 2013? Reviewed by Salaudeen Rajack on 6:55 PM Rating: 5

Increase Maximum File Upload Size in SharePoint 2013

6:57 PM    , , , ,
SharePoint 2013's default file upload size is 250 MB! To upload large files you have to change "Maximum Upload Size" setting in SharePoint 2013 Central administration site. How to increase file upload size in SharePoint 2013? Maximum upload size setting is configured per web application. To change maximum upload size in SharePoint 2013, do the following: Browse to SharePoint 2013 Central Administration site Navigate to Application Management >>Manage Web Applications  Select your web application and click on Web Application General Settings in the ribbon In the web application general settings page, you can set the "Maximum Upload Size" value to the value you desire (Say, you want to increase upload size to 500 MB!) and hit OK to save your changes. This changes maximum upload size in SharePoint 2013. You can specify the maximum value up to 2 gigabytes (or 2047 megabytes as specified in Central Administration).  In my SharePoint 2013- Windo
Increase Maximum File Upload Size in SharePoint 2013 Increase Maximum File Upload Size in SharePoint 2013 Reviewed by Salaudeen Rajack on 6:57 PM Rating: 5

Enable Anonymous Access in SharePoint using PowerShell

4:52 PM    , , , , , ,
How to Enable Anonymous Access in SharePoint using PowerShell? In continuation with my last post, How to Enable Anonymous Access in SharePoint 2013 , Here are some nifty PowerShell scripts to manage anonymous access in SharePoint: Enabling anonymous access in SharePoint involves three steps: Enable anonymous access for SharePoint web application Enable anonymous access SharePoint site Turn ON anonymous access on lists and libraries PowerShell to Enable Anonymous Access settings of a Web Application: Add-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue $webApp = Get-SPWebApplication 'http://sharepoint.crescent.com/' $webApp.IisSettings['Default'].AllowAnonymous=$true $webApp.update() PowerShell to Set anonymous access on specific SharePoint sites: $web = Get-SPWeb http://sharepoint.crescent.com/sites/operations #Enabled - lists and libraries; On - Entire web site ; Disabled - Self explanatory :-) $web.AnonymousState = [Micros
Enable Anonymous Access in SharePoint using PowerShell Enable Anonymous Access in SharePoint using PowerShell Reviewed by Salaudeen Rajack on 4:52 PM Rating: 5

How to Enable Anonymous Access in SharePoint 2013?

2:18 PM    , , , , ,
As the name suggests, Anonymous access allows anonymous users to view pages in SharePoint. Setting up anonymous access in SharePoint sites is a common task for most us, Often we do it to enable anonymous access for SharePoint 2013 for public facing sites. Lets see the steps needed to configure anonymous access in SharePoint 2013.  Enable anonymous access for SharePoint 2013 web application: To enable anonymous access to an existing SharePoint 2013 site, we've to enable anonymous access at web application level first. Navigate to: Central Administration >> Application Management >> Manage web applications In the Web Application Management page, select your target web application. Now, from  ribbon click on "Authentication providers" button Click on the relevant zone from the authentication providers. In my case its "Default". Check "Enable anonymous access" option in the authentication providers page. Scroll down and press the "
How to Enable Anonymous Access in SharePoint 2013? How to Enable Anonymous Access in SharePoint 2013? Reviewed by Salaudeen Rajack on 2:18 PM Rating: 5

Merge-SPLogFile: Merge SharePoint Log Files from Multiple Servers

6:30 PM    , , , , , ,
Problem: In a multi-server SharePoint farm, if you need to trace an issue, you have to log-in and review the ULS logs on each server in the farm. This process could be tedious in multi-server farms since you're not sure on which server the error has occurred. Solution: Use the Merge-SPLogFile PowerShell cmdlet. The Merge-SPLogFile cmdlet will consolidate the logs from all servers in the SharePoint farm into a single log file. You can run it from any server and it gathers data from the entire farm - to find issues. Here are some examples of Merge-SPLogFile: Extract LOG from all SharePoint Servers matching correlation ID: Merge-SPLogFile -path "D:\ErrorLog.txt" -Correlation "Your-error-correlation-id" Use the above cmdlet to fetch ULS log for given correlation ID from all SharePoint servers in a multi-server farm. Here "path" refers to the log file name you want to create. If it already exists, use "overwrite" switch. This cmdlet l
Merge-SPLogFile: Merge SharePoint Log Files from Multiple Servers Merge-SPLogFile: Merge SharePoint Log Files from Multiple Servers Reviewed by Salaudeen Rajack on 6:30 PM Rating: 5

Database is up to date, but some sites are not completely upgraded

4:05 PM    , , , , , ,
Problem: Getting database status as "Database is up to date, but some sites are not completely upgraded" from "Review Database Status" page in Central Administration, Root Cause: This simple means: SharePoint Products Configuration wizard is unsuccessful in upgrading the specific database. Solution: Go to SharePoint Central Administration >> Upgrade and Migration >> Review database status >> Get the list of Databases that need upgrade. Fix database upgrade status with below PowerShell cmdlet: Upgrade-SPContentDatabase Fix database upgrade status with PowerShell cmdlet: Upgrade-SPContentDatabase Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Set this variable value accordingly $DatabaseName = "content_database_name_here" #Get the Database ID $DatabaseID = (Get-SPContentDatabase -identity $DatabaseName).ID #Update Content Database Upgrade-SPContentDatabase -id $DatabaseID -Confirm:$false Onc
Database is up to date, but some sites are not completely upgraded Database is up to date, but some sites are not completely upgraded Reviewed by Salaudeen Rajack on 4:05 PM Rating: 5

Find and Delete Unused Orphan Databases in SharePoint

4:08 PM    , ,
Problem: In a SharePoint 2013 pilot environment, Created several Web applications and service application for testing purpose. Some of those web applications are deleted without deleting their databases. After a while, The database server is filled up and we got to cleanup SQL Server by deleting unused SharePoint databases. Solution: Using SharePoint 2013 Central administration to find out the databases used by web applications. Get Active SharePoint Content Databases: Navigate to Central Admin > Application Management > Manage Content Databases page. You can select and see which content databases are used by web apps. Get Active SharePoint Service Application Databases: Similarly, Navigate to Central Administration > Manage Service Applications >> Select the  service application > Properties. This would show you what databases are used by the particular service application. But, You got to repeat these steps manually for all web applications and service a
Find and Delete Unused Orphan Databases in SharePoint Find and Delete Unused Orphan Databases in SharePoint Reviewed by Salaudeen Rajack on 4:08 PM Rating: 5

Restore-SPSite: The operation that you are attempting to perform cannot be completed successfully

1:04 PM    , , , ,
Problem: While trying to restore a site collection, with "Restore-SPSite" cmdlet in PowerShell, Got this error: Restore-SPSite : The operation that you are attempting to perform cannot be completed successfully.  No content databases in the web application were available to store your site collection.  The existing content databases may have reached the maximum number of site collections, or be set to read-only, or be offline, or may already contain a copy of this site collection. Create another content database for the Web application and then try the operation again. Root cause and solution: If you try to backup - restore a site collection on SAME content database, you'll end-up with this error. Solution: Create a new content database and restore your backup to the specific content database. Restore-SPSite http://intranet.crescent.com/sites/sales -Path D:\Backup\sales.bak -DatabaseServer SP13SQL -DatabaseName SP13_Sales_Content If you are tyring to  overwri
Restore-SPSite: The operation that you are attempting to perform cannot be completed successfully Restore-SPSite: The operation that you are attempting to perform cannot be completed successfully Reviewed by Salaudeen Rajack on 1:04 PM Rating: 5

How to Change Favicon in SharePoint 2013?

10:39 AM    , , , ,
Favicon - short form for "Favourites Icon" adds branding to SharePoint 2013 sites. Its not only used for bookmark Favourites, but also in address bar, browser icon locations too. In case you want to change favicon in SharePoint 2013, here are the options. SharePoint 2013 favicon location: By default, SharePoint 2013 uses favicon located in path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\template\images" which is mapped as "/_layouts/15/images/favicon.ico", favicon size is: 16x16 pixels. Add favicon to SharePoint 2013 To add favicon to SharePoint 2013 sites, Login to you SharePoint Foundation/Server WFE. Upload your custom favicon to 15 hive's images folder. If you have multiple WFEs, you must upload to all of your web front ends. Edit your master page (on publishing sites, edit your HTML master page) and locate the following chunk: <SharePoint:SPShortcutIcon runat="server" IconUrl="/_layout
How to Change Favicon in SharePoint 2013? How to Change Favicon in SharePoint 2013? Reviewed by Salaudeen Rajack on 10:39 AM Rating: 5

No Apps are installed to open this type of link (grvopen) - Fix Sync Issue

1:19 PM    , , ,
Sync feature in SharePoint provides two way between SharePoint libraries and your local computer. Getting "No Apps are installed to open this type of link (grvopen)" error message on clicking "Sync" button in SharePoint 2013? In some cases SharePoint 2013 sync button not working? Solution: SharePoint 2013 sync button requires Sync client (such as "SharePoint workspace")! You can also use  OneDrive for Business (formerly SkyDrive Pro) Sync client tool from: http://support.microsoft.com/kb/2903984 Its a Office 2013 application used to sync SharePoint libraries to your compute Pick the right tool for your language, and when prompted provide the product key supplied in the above link. Once installed, you should get sync functionality for your SharePoint sites.
No Apps are installed to open this type of link (grvopen) - Fix Sync Issue No Apps are installed to open this type of link (grvopen) - Fix Sync Issue Reviewed by Salaudeen Rajack on 1:19 PM Rating: 5

Change SharePoint 2013 Site Logo Link to Root Site URL

8:34 PM    , , ,
By default, on clicking the SharePoint 2010 or SharePoint 2013 site logo - It takes us to the root of the current site or sub-site. But you may want to link logo to top level site.Well, to change this behavior you got to change the master page. Important: Since this is a Master page change, You have to apply the updated master page to all site collections for the changes to take effect! Set SharePoint 2010 logo link root site: Open your Master page in SharePoint Designer 2010, Locate the below line: <SharePoint:SPLinkButton runat="server" NavigateUrl="~site/" id="onetidProjectPropertyTitleGraphic"> Replace the ~site value with ~sitecollection .Save and close the master page (approve and publish, if required!) . This changes SharePoint 2010 logo link to root site collection. In SharePoint 2013 - Change site logo link URL: Open your SharePoint 2013 site in SharePoint designer 2013, Edit the master page in "Advanced Edit Mode"
Change SharePoint 2013 Site Logo Link to Root Site URL Change SharePoint 2013 Site Logo Link to Root Site URL Reviewed by Salaudeen Rajack on 8:34 PM Rating: 5

Change Quick Launch Width in SharePoint 2013/2010/2007

7:12 PM    , , , , , ,
When using lengthy titles in SharePoint 2013 quick launch bar, we may have to increase the width to fit the contents without wrapping to next line. Here are the nifty collection of CSS styles to change the width of left navigation in SharePoint. SharePoint 2013 left navigation width: <style type="text/css"> /*increase quick launch width */ #sideNavBox { width:250px; } /*Middle Content */ #contentbox{ margin-left: 290px; } </style> SharePoint 2010 increase quick launch width: <style type="text/css"> /*sharepoint 2010 change left navigation width*/ #s4-leftpanel { width:180px; } /*Middle Content */ .s4-ca { margin-left: 200px; } </style> Change SharePoint 2007 quick launch width: <style type="text/css"> /*sharepoint quick launch column width*/ .ms-quicklaunchouter { width:150px!important; } </style> All of these SharePoint quick launch width changing CSS codes can be from Script Editor Web Part, SharePo
Change Quick Launch Width in SharePoint 2013/2010/2007 Change Quick Launch Width in SharePoint 2013/2010/2007 Reviewed by Salaudeen Rajack on 7:12 PM Rating: 5
Powered by Blogger.