Thursday, August 25, 2011

How to Restrict Users from Switching Views in SharePoint?

Yes, that was a common requirement from our SharePoint users! They wants to restrict other users from changing views from views drop-down in SharePoint. Here is how we can make it happen:
  • Browse to the target list or library
  • Click on Site Action > Edit Page
  • On the Web Part Click Edit > Modify Shared Web Part
  • Change Toolbar to either ‘Summary’ or ‘No toolbar’
  • Now users won't get the select ‘View’ drop-down menuRestrict Users from Changing Views in SharePoint
This will hide the "View" drop down! Same thing can be done with SharePoint designer as well.

And for users who needs the access,  you can create a target audience navigation link that links them to the proper view of the list/library.

What if user types the View URL directly? we can't stop them, right? So the perfect solution is Set Permissions and Restrict Access to SharePoint Views

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

Get Installed SharePoint Farm Version Build Number/Patch Level/Service Pack

Want to know SharePoint version installed on your environment? There are several ways to get your MOSS 2007/SharePoint 2010 version build numbers. Here are some:

How to find installed SharePoint 2013 build version? Simple! Navigate to Central Administration >> System Settings >> Servers in this Farm
determine sharepoint patch version

 1. You can find SharePoint 2007 version in Central Administration:
  •     Go to Central Administration
  •     Click the Operations tab.
  •     Click Servers in farm under the "Topology and Services" section.
This shows the version number for the farm and each individual server in the farm.
sharepoint version am running sharepoint version in central admin
Find what version of SharePoint is installed in SharePoint 2010:
Find out SharePoint version you are running, Go to Central Admin >> Upgrade and Migration >> Select "Check product and path installation status" to get the currently installed version.

2. Open any of your SharePoint site, click Site Action >> and then click Site Settings > On the Site Settings page, the version information is displayed next to version.
get sharepoint version number
3. You can identify SharePoint version from Installed Programs. Go to Control Panel > Add and Remove Programs. Select SharePoint server and then click: Click here for support. Now a window will pop up that displays your current SharePoint version.

4. Open your SharePoint site in SharePoint Designer (can be the main site or any sub-site), click Site Settings under the Site menu on the top toolbar. you’ll find the version of SharePoint running the site on the general tab under SharePoint version
find sharepoint version build

5. You can use the below code, If you wan to get SharePoint version programmatically using object model:
 using (SPSite startSite = new SPSite("<Central Admin url>"))
  SPFarm farm = startSite.WebApplication.Farm;

How to get SharePoint version using PowerShell?
To get SharePoint version using PowerShell, use this script.
$farm = [Microsoft.SharePoint.Administration.SPFarm]::Local
write-host $farm.BuildVersion
#We can use:(Get-SPFarm).BuildVersion.ToString() in SharePoint 2010 / 2013

6. Another shortcut to determine the SharePoint version: Get SharePoint version from registry key: go to the registry key: hklm\software\microsoft\shared tools\web server extensions\12.0 (or 14.0 for SharePoint 2010)

If you want to know What Edition of SharePoint is installed (Standard or Enterprise), you can look in Central Administration > Operations > Convert License Type

Here is the reference table:
SharePoint 2007 version numbers:
SharePoint 2007 ReleaseKB ReferenceVersion Number
August 2010 Cumulative updateKB2276474/KB227647212.0.0.6545
June 2010 Cumulative updateKB983311/KB98331012.0.0.6539
April 2010 Cumulative updateKB981043/KB98104212.0.0.6535
February 2010 Cumulative updateKB978396/KB97839512.0.0.6529
December 2009 Cumulative updateKB977027/KB97702612.0.0.6524
October 2009 Cumulative updateKB974989/KB97498812.0.0.6520
August 2009 Cumulative updateKB973410/KB97340912.0.0.6514
June 2009 Cumulative updateKB971538/KB97256912.0.0.6510
April 2009 Cumulative UpdateKB971537/KB97153812.0.6510.5000
April 2009 Cumulative Update KB968851/KB96885012.0.0.6504
Service Pack 2KB953334/KB95333812.0.0.6421
 Cumulative update KB956056/KB95605712.0.0.6327
Infrastructure Update KB951695/KB95129712.0.0.6318
post-SP1 hotfixKB94894512.0.0.6303
post-SP1 hotfixKB94127412.0.0.6301
post-SP1 hotfixKB94142212.0.0.6300
Security Bulletin MS07-059KB94201712.0.0.6039
August 24, 2007 hotfix packageKB941422
RTM [Released To Manufacturing]-
Beta 2 TR-
Beta 2-

Get the latest patches from:

SharePoint 2010 version numbers:
​DescriptionSPF KB​SPS KB​Version​
SP 2010 (Tech Preview)14.0.4006.1030
Jun 2010 ​KB2028568​14.0.5114​
Aug 2010 CU​KB2352346​KB2352342​14.0.5123.5000​
Oct 2010 CU​KB2394323​KB2394320​14.0.5128.5003​
Dec 2010 CU​KB2459125​KB2459257​14.0.5130.5002​
​Feb 2011 CU​KB2475880​KB2475878​14.0.5136.5002
Apr 2011 CU​KB2512804​KB2512800​14.0.5138.5001​
Jun 2011 CU​KB2536601​KB2536599​14.0.6106.5000​

You can get the latest releases from:

Last but not least: To check version build number for SPS 2003:
Go to Control Panel >> Add/Remove Programs >> Microsoft Office SharePoint Portal Services or Windows SharePoint Services >> Click Here for Support Information.

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

Monday, August 22, 2011

Fix "Missing Event Receivers" issue in SharePoint Migration

During SharePoint 2010 Migration, Preupgradecheck reported the issue of missing Event Receivers:
The following event receiver assembly(s) are referenced by the content, but they are not installed on the web server

The following event receiver assembly(s) are referenced by the content, but they are not installed on the web serverSo,  To resolve this issue we need to two steps:
  1. Get all list locations, where a particular event receivers  is registered
  2. Un-register the event receiver from the list/document library.

Step 1: Get the list of location (Lists, Document Libraries) where the particular Event handler is registered:

How to get the locations where event receivers are installed? Simple! Just execute the following STSADM command:

 stsadm -o enumallwebs -includeeventreceivers > EventReceivers.txt

Now we got the report. By opening the EventReceivers.txt in Excel, you can examine where that particular event receiver is in use.

Step 2: Un-Register the Event Receivers:

We have got the locations now. Next step is un-register them. Here comes the Handy tool: Event Receiver Manager, download it from:
Fix "Missing Event Receivers" issue in SharePoint Migration

Navigate to the site from the report, Select the library, and then click "Remove Selected Event Handler" button. That's all!

Another nice utility to help on this issue is: SharePoint Manager 
Event Receiver Missing issue Solution in SharePoint

You can use:  Event Receiver Manager also.

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

Saturday, August 20, 2011

SharePoint 2010 Topology - For 25k Users

Requirement: SharePoint Topology for handing 25k users in a Intranet environment.

My Recommendation: as below

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

Friday, August 19, 2011

Visual Upgrade All SharePoint Sites in a web application using PowerShell

After the Migration using database attachment method, Had to upgrade all sites to New SharePoint 2010 User Interface. Used this PowerShell code to accomplish.

SharePoint 2010 visual upgrade powershell script

##### Visual Upgrade All SharePoint Sites to 2010 version in a Web Application #####
$SPwebApp = Get-SPWebApplication ""
    foreach ($SPsite in $SPwebApp.Sites)
       foreach($SPweb in $SPsite.AllWebs)
           $SPweb.UIVersion = 4  #set it to 3 if you want SharePoint 2007 look and feel
    write-host $spweb.url
read-host  #just to pause

Or you can use the SPSite's VisualUpgradeWebs() method:

$webapp = Get-SPWebApplication <web-app-URL>
foreach ($site in $webapp.sites)

Here is the Before/After images:
visual upgrade sharepoint powershell

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

Thursday, August 18, 2011

Remove a Web Part Programmatically using PowerShell

We have had bunch of SharePoint 2007 site collections and recently upgraded them to SharePoint 2010. After the upgrade for some reasons, we wanted to delete a particular web part (Tip of the day web part) from the home page of All migrated sites' default.aspx page of the many sites.

I get into Maintenance mode (by just appending "?contents=1" to the end of URL) and deleted the particular web part.

But there are 1000+ sites migrated from SharePoint 2003, OMG! So, wrote the code to delete the error web parts Programmatically remove web parts. This saved my day!

Here is the code to remove web part on default.aspx page of a particular site:

Remove a Webpart Programmatically using PowerShell
$SPsite = Get-SPSite http://sharepoint-site/sites/admin/
$SPweb =  $SPsite.OpenWeb()  

$webpartmanager = $SPweb.GetLimitedWebPartManager(($SPweb.Url + "default.aspx"),  [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)

   $webpartsarray = @()

 For($i=0;$i -lt $webpartmanager.WebParts.Count;$i++)
    if($webpartmanager.WebParts[$i].title -eq "Tip of the Day")  #Check for particular web part
      $webpartsarray = $webpartsarray + $webpartmanager.WebParts[$i].ID

 #write-host $var

 for($j=0; $j -lt $var; $j++)

  # call CloseWebPart method to close the web part


In an another case, I had a similar situation where a particular web part throws the error message. Actually those Error webpars are Site Tree web parts, which is not supported after SharePoint 2003. So Decided to delete the error webparts from the site rather fixing it.

"Error: Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe."

So, I used the above technique with:

 if(!$webpartmanager.WebParts[$i].title)  #Check for Null

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

Tuesday, August 16, 2011

MOSS 2007 to SharePoint 2010 Migration Project Plan

Here are the Milestones for SharePoint 2007 to SharePoint 2010 migration plan from one of my Migration Project from MOSS 2007 to SharePoint 2010 using Database attach method.

 MOSS 2007 to SharePoint 2010 Migration - Milestones (Assuming planning stage is completed)
S.NoTask NameResource
IPrepare Existing Environment for Migration
Run Pre-Upgrade check toolSharePoint Admin
Resolve and Clean the Pre-upgrade checker reported issuesSharePoint Admin
Analyze and remove any un-used feature/site in existing environmentSharePoint Admin
Create list of customizations, Settings which needs manual moveSharePoint Admin
IIPlanning Review
   Review Software AvailabilitySharePoint Admin
   Review Available HardwareSharePoint Admin
   Obtain and verify Service accounts, DNS Entries, URLsSharePoint Admin & Infrastructure Team
IIICreate and configure the new environment (DEV, STAGING, PROD)
Identify and Prepare Architectural, Topology DiagramsSharePoint Admin
Install necessary server roles, Pre-reqs on the machinesSharePoint Admin
Configure IIS, .NET Framework 3.5
Install and configure IIS compressionSharePoint Admin
Configure Log file location & Tweak the IIS Settings for SharePointSharePoint Admin
      Install Software 
 Assign roles to the MachinesSharePoint Admin & Infrastructure Team
Install SQL server and Establish Clustering & MirroringSharePoint Admin & Infrastructure Team
Install the SharePoint Binaries on the target machinesSharePoint Admin
Install Language packs if neededSharePoint Admin
Configure SharePoint
Run Configuration WizardSharePoint Admin
Create web application for Portal, Search, EtcSharePoint Admin
Setup SharePoint Configuration Settings (Farm, Web App Settings, Etc)SharePoint Admin
 Configure Recycle Bin retention and Site Delete Confirmation SharePoint Admin
Site templates, Quotas, General Settings, Incoming-Outgoing Mail setupsSharePoint Admin
 Configure usage analysis SharePoint Admin
 Configure antivirus protection SharePoint Admin & Infrastructure Team
Configure My Site
Create My Site web applicationSharePoint Admin & Infrastructure Team
 Configure user profiles SharePoint Admin
Configure the Import fields from AD & Profile Import schedulesSharePoint Admin & Infrastructure Team
 Configure audiences SharePoint Admin
Configure Kerberos AuthenticationSharePoint Admin & Infrastructure Team
Configure SSLSharePoint Admin & Infrastructure Team
      Install Infrastructure UpdatesSharePoint Admin & Infrastructure Team
     Configure Search 
Install the Ifiters for Search (PDF, Zip, Docx, PPTX, XLSx, Etc)SharePoint Admin
Configure content sources SharePoint Admin
Create the Crawl SchedulesSharePoint Admin
 Configure best bets and keywords for search SharePoint Admin
Configure search scopes SharePoint Admin
 Establish and implement search monitoring and tuning plan SharePoint Admin
 Monitor search performance SharePoint Admin
Configure service applications
 Access Services   SharePoint Admin
 Business Data Connectivity  Services SharePoint Admin
 Excel servicesSharePoint Admin
 Managed Metadata  ServicesSharePoint Admin
 PerformancePoint  Services SharePoint Admin
 Search ServicesSharePoint Admin
 Secure Store  Services SharePoint Admin
 Usage and Health Services  SharePoint Admin
 User Profile Services  SharePoint Admin
 Visio Graphics Services  SharePoint Admin
 Web Analytics Services  SharePoint Admin
 Word Automation ServicesSharePoint Admin
Install and configure Office Web AppsSharePoint Admin
      Install Third-Party applicationsSharePoint Admin
Load Balancing & Publishing (ISA/F5) the SharePoint sites Infrastructure Team & SharePoint Admin
IVRe-build Solutions from Existing Environment 
      Setup Branding
Create theme for corporate brandingSharePoint Admin & Development Team
Build the Master pageSharePoint Admin & Development Team
Create the solution package for branding & ApplySharePoint Admin & Development Team
Rebuild MOSS 2007 custom Features/Webparts/ Assemblies/Solutions and Re-apply in New environmentSharePoint Admin & Development Team
Modified Web.Config , File system ChangesSharePoint Admin & Development Team
      Prepare Documentation & Implementation GuidesSharePoint Admin & Development Team
VContent Migration (Backup, Restore & Attach the content Databases)
Take Existing SQL Server Content DB  Backup (Set the previous version databases to be read-only while taking Backup!)SharePoint Admin & Infrastructure Team
Restore to STAGGING, PROD Environments (Set the previous version databases, Restored DBs as read-write)SharePoint Admin & Infrastructure Team
Test the Content databases (Test-SPContentDatabase) and fix any issue if existsSharePoint Admin
     Attach the Databases to SharePoint STAGGING, PROD EnvironmentsSharePoint Admin
Migrate the invidual solutions (InfoPath Forms, etc)SharePoint Admin & Development Team
     Test and Evaluate EnvironmentsSharePoint Admin
      Prepare Documentation & Implementation GuidesSharePoint Admin
      Test Portal Web Site using a Domain AccountTesting Team
      Test based on usage patterns and business scenarios  Testing Team
Test My Sites, and user profile SyncTesting Team
Test search and indexing Testing Team
Test solutions Testing Team
     Test Service Application integrations Testing Team
Test 3rd part application functionalityTesting Team
      Test Incoming and Outgoing E-Mail SettingsTesting Team
      Test Content and People SearchTesting Team
Fix the issues reported during Testing PhaseSharePoint Admin & Infrastructure Team
Setup Self service Portal (User Request creation, FAQs,Lessons, KEDB, Best Practices, Policies, Etc)SharePoint Admin
      Developer Training SharePoint Admin
   Train Stakeholders SharePoint Admin
   Support Training SharePoint Admin
VIIIPost-Implementation Operations
Run SharePoint Health analyzer and fix the issuesSharePoint Admin
Review and Clear the Event Log, SharePoint LogsSharePoint Admin
Configure SCOM Monitoring for SharePoint serversSharePoint Admin & Infrastructure Team
Planning for Backup and Restore/Disaster Recovery /Business ContinuanceSharePoint Admin & Infrastructure Team
 Reporting and Monitor Growth, Usage and Performance SharePoint Admin & Infrastructure Team
Plan for Scheduled Performance tuning, Clean-up in SQL & SharePoint SharePoint Admin & Infrastructure Team

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

You might also like:

Related Posts Plugin for WordPress, Blogger...