Thursday, November 17, 2011

How to save a site as template using PowerShell

Here is Powershell script to save a site as template.

$SiteUrl = "http://Sharepoint2010/site"
$Web=Get-SPWeb $SiteUrl
$Web.SaveAsTemplate("Template Name","Template Title","Template Description",1)

The last parameter of SaveAsTemplate() can be 0 or 1. 1 if you want to save the site with data else 0.
Make sure you open the SharePoint Management Shell as Administrator.

Error - "MOSS MA not found”

Yesterday I got his error "MOSS MA not found”  while creating the connector for User Profile synchronization in SharePoint 2010.

To fix that -
I restarted the Forefront Identity Manager Service and the Forefront Identity Manager Synchronization Service.

To find those services
Run > Services.msc > Forefront Services > right click and select restart. 
If services do not start, You may need to enter service account/password on Logon Tab of service properties screen.

Hope this help!

How to Hide search box

There are ways to hide the search box. 

1. If you can edit master page, just set ‘visible’ property of Serachbox control to false. (DONOT Edit OOTB SharePoint master page and may cause issues in other areas.)

<SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" Version="4" Visible="false"/> 

2. You can use CSS to hide the Searchbox by setting the display property to none. Add this to custom css file.
#s4-searcharea { display:none; }

If you want to hide search box in a specific page then you can use Content Editor webpart and place CSS code like this. 
<style>
#s4-searcharea { display:none; }
</style>

How to Hide a List using PowerShell

Last week i had a requirement to hide a list from user view. To achieve that, I used PowerShell to hide a list in SharePoint 2010 by setting hidden property of SPList Object to $true.

Here is the script -

#--- Update these variables -----
$SiteUrl = "http://Sharepoint2010/site"
$ListURL = "http://Sharepoint2010/site/Lists/ListToHide"
#-------------------------------------


$Web = Get-SPWeb $SiteUrl
$List = $spWeb.GetList($ListURL)
$List.Hidden = $true
$List.Update()

Wednesday, August 31, 2011

PowerShell script to list all Webs and Site Templates

Today I wanted to know site templates of all webs with in a site collection. Easiest way to get this is via PowerShell.
Here is the PowerShell script to get all Webs within a SiteCollection and it prints Site Template name along with Title and URL. 
Just update $siteUrl and you are good to go.

$siteUrl = "http://myserver.com/"
$site = Get-SPSite $siteUrl
foreach ($web in $site.AllWebs) { 
            $web | Select-Object -Property Title, Url, WebTemplate 
}
$site.Dispose()

Sunday, August 28, 2011

SharePoint 2010 Best Practices on TechNet

Today while browsing for something I came across a series of best practices articles published on TechNet. It will really help us to design and operate a enterprise level SharePoint environment.
http://technet.microsoft.com/en-us/library/cc850682.aspx

Change User Password Via Remote Desktop

Recently i need to change my windows password when connected via Remote Desktop (RDP). Interesting part is under remote desktop you cannot hit CTRL+ALT+DEL to change password. So how can you change password, here are steps.
  1. Login into server over RDP session.
  2. Click on Start > Windows Security
  3. Click on the "Change Password" button.
  4. Now, enter your old password, then your new password twice in the respective fields.
  5. Finally, click "OK"
That's it. Password has been changed.

Sunday, July 10, 2011

SP1 for SharePoint 2010 is out there!

Service Pack 1 for SharePoint 2010 Products is Now Available for Download
Service Pack 1 for SharePoint 2010 products includes stability, performance, and security enhancements that are a direct result of customer feedback and are designed to extend the value customers experience with SharePoint 2010.
Service Pack 1 includes all fixes released through April 2011 so it can be installed directly to RTM builds of SharePoint 2010 Products, or any prior Cumulative Update.
Some of the new features you can look forward to after installing SP1:
  • The best new feature is Recycle bin: Lets you restore a site collection or a web that was deleted. If those pesky users "accidently" delete their web, no more worries. You can quickly and painlessly recover it from the Recycle Bin.
  • SP1 brings back on old functionality from SharePoint 2007: StorMan.aspx, or Storage Manager. This page allows you to look at the storage throughout your site collection and find how much space your lists and libraries are using. This becomes particularly useful when you need to get your site collection size back under control relative to your site quota limitations, and is great information to have in general.
  • Remote Backup Systems (RBS) and shallow copy can decrease downtime and increase efficiency by moving pointers to databases instead of moving databases.
  • Support for Microsoft SQL Server 2011.
  • A more robust Search Host Distribution service that improves error recovery and performance during the search crawl.
  • Adds backup and restore functionality to recover deleted site collections and webs.
  • Improved support for Internet Explorer 9.
Important -
Now before you install SP1 on your production farm, I highly recommend installing it in a test farm first. You want to make sure that your farm and any customizations you may have made are compatible with SP1. Remember, you cannot uninstall a SharePoint hotfix or Service Pack, so if things go horribly wrong the only recovery you have is rebuilding from your backups.
After you install Service Pack 1 you must run the SharePoint Products and Technologies Configuration Wizard (PSConfigUI.exe) to run upgrade which will update the farm to the latest version. The version of content databases will be 14.0.6029.1000 after successfully installation.
This step is required in order to have full SharePoint functionality. If you do not run PSConfigUI the farm will run, but with reduced capacity. For example, Search will not be able to index content.
You must restart the User Profile Synchronization service after installing Service Pack 1. For more information see the Start the User Profile Synchronization service section in the Configure profile synchronization article in the library.

SharePoint can handle larger databases up to 4TB

Good News! SharePoint 2010 Products will now support content databases up to 4TB.  However, prior to considering multi-terabyte databases you should thoroughly review.

Read the Bill Baer blog Serving larger databases for detailed instructions.

Thursday, May 26, 2011

Guide to Successful SharePoint Implementation


If you closely watched the growth and transition of SharePoint, the majority of SharePoint implementations in the early days were unsuccessful for various reasons to name few "lack of product knowledge", "solutions delivered were complicated (reinventing the wheel)", "not user friendly due to lack of awareness & training", "over budget", "resource consuming", "high support and maintenance cost" and so on. Most of these could have been avoided or simplified with in depth technical/product knowledge augmented by well-planned Governance, training and support & acceptance from business user community.

Adoption is a key factor to successful SharePoint implementation. Getting business users to adopt the technology and become champions of the business process is the key driver to a successful SharePoint implementation at any organization. Business Stakeholders should understand that they have to help to drive SharePoint adoption.

SharePoint is designed to empower the Knowledge Worker. The only way to truly engage the Knowledge Worker is to allow them to have input into the functionality of SharePoint which makes them more productive.
Needless to say "Planning" is the most important every phase of the SharePoint implementation projects. If you take the time to plan SharePoint environment properly and include all the right resources, then the implementation should go much smoother.

SharePoint farm architecture which includes the number of servers, how big should be the farm, Capacity planning, Scalable Information Architecture and Classification, load balancing, database clustering and caching to improve performance. If the farms are geographically distributed, then synchronizing the centralized data across geographic regions, redundancy and failover strategies, data backup & restore is the most challenging part, unless everyone is connecting to a single data center directly, which implies use of Internet lines instead of MPLS connectivity over WAN, leading to other pro and cons.

Governance plan defines the service, roles, team, technology and the policies. Governance planning is even more important in SharePoint 2010 because the increased emphasis and availability of social computing features means there are more types of content to govern. Key areas are people, process, technology, and policies to define a service, resolve ambiguity, and mitigate conflict within an organization, web content management, records management capabilities, sharing metadata across multiple site collections, Document Retention, release management and disaster recovery process etc

If the user base is extremely large, then Introducing socialize governance within a large organization where process is something new and hard to put in place. Also requires a micro level study by the SharePoint Enterprise Architect to evaluate the data limits, rights limit, and departmental use of data. Growth patterns of data over a period of time for different departments would be different and to keep track of such policies on a regular basis to mitigate Data volume growth risks poses a bigger challenge.

If portal has too many customized web parts, then performance becomes a bigger challenge. To lay down architectural rules for design and coding of such components so that it meets the performance criteria.

Big challenge is to educate the business users to use the SharePoint in the "right way". In essence "Effective Planning and Governance", "Change Management", "User training" and "Continuous Support" is the key to successful implementation of SharePoint organization wide.

Tuesday, May 24, 2011

Service Pack 1 for Office and SharePoint 2010 is around the corner…

As per the official blog of the Microsoft SharePoint Product Group major changes going to come in SharePoint 2010 SP1 Schedule to be released in Late June

Some of the important new functionality that will be brought to SharePoint 2010 with Service Pack 1

Site Recycle Bin
Service Pack 1 will introduce long awaited Site Recycle Bin functionality that enables self-service recovery of site collections and sites.   In the past IT Professionals were tasked with restoring entire databases to recover deleted site collections and sites and would generally require expensive restore environments to support the task.  Now in Service Pack 1 administrators can quickly and easily recover site collections and sites accidentally deleted by their owners in a process similar to that of the Recycle Bin we have for Lists, Libraries, and Documents.

Shallow Copy
If you’re using Remote BLOB Storage you’ve probably realized that when moving Site Collections (Move-SPSite) between content databases each unit of unstructured data (BLOB) was round tripped (I.e. uploaded and subsequently downloaded again) serially during the move.  This operation was both time consuming and resource intensive.  In Service Pack 1 we reduce that overhead by enabling “shallow copy” when moving Site Collections between databases where Remote BLOB Storage is used.  New Shallow Copy functionality with the Move-SPSite CmdLet enables moving site collections between content databases without moving the underlying unstructured data, i.e. Microsoft Word documents, PowerPoint Presentations, etc. significantly increasing performance and reliability for organizations using Remote BLOB Storage by simply updating the pointers to those objects in the destination content database.

StorMan.aspx
In SharePoint 2010 we removed StorMan.aspx (Storage Space Allocation) (see http://support.microsoft.com/kb/982587/EN-US) which in previous versions of SharePoint enabled granular management and insight into storage.  For example, the page would show you the top 100 documents or document libraries in terms of size.  With that information end users could the page to clean up content from their site(s) by deleting the large content that they no longer needed.  In Service Pack 1 we are bringing back an improved StorMan.aspx, enabling users to better understand where their quota is going and act upon that information to reduce the size of their sites.

New enhancements will improve the way you interact with information in SharePoint 2010. Service Pack 1 adds support for working with SharePoint and the Office Web Applications using Internet Explorer 9 and the Google Chrome browser (for a complete list of supported browsers for SharePoint 2010 see also http://technet.microsoft.com/en-us/library/cc263526.aspx), support for Open Document Format documents, and more.

NOTE
The plan browser support articles on TechNet for SharePoint Foundation 2010 and SharePoint Server 2010 will be updated with the new browser support information as Service Pack 1 nears release in late June 2011.

In addition to the new functionality Service Pack 1 provides, as with all Service Packs, it will include a number of fixes  designed to improve your experience with SharePoint 2010 and will include all Cumulative and Public Updates through the April 2011 Cumulative Update.
SP1 for Office 2010 & SharePoint 2010 will be offered in the form of manual download from Microsoft Download Center for first 90 days after the release, after which it will be included as an Automatic update for Office 2010.
After installing SP1 for Office 2010 and SharePoint 2010 you will get:
  • Better alignment between Project Server and SharePoint Server browser support.
  • Improved backup / restore functionality for SharePoint Server
  • Internet Explorer 9 “Native” support for Office Web Applications and SharePoint
  • Office Web Applications Support for Chrome
  • Outlook fixes an issue where “Snooze Time” would not reset between appointments.
  • The default behavior for PowerPoint “Use Presenter View” option changed to display the slide show on the secondary monitor.
  • Integrated community content in the Access Application Part Gallery.
  • The Word Web Application extends printing support to “Edit Mode.”
  • Project Professional now synchronizes scheduled tasks with SharePoint task lists.
  • Inserting Charts into Excel Workbooks using Excel Web Application
  • Support for searching PPSX files in Search Server
  • Visio Fixes scaling issues and arrowhead rendering errors with SVG export
  • Proofing Tools improve spelling suggestions in Canadian English, French, Swedish and European Portuguese.
  • Outlook Web Application Attachment Preview (with Exchange Online only)