Wednesday, November 20, 2013

A Few Good SharePoint 2010 Tips & Tricks

Frequently I come across some neat tips and tricks in SharePoint that help either support my end user base or help with administration.  I wanted to post a few of them here, not only for my own recollection but also to hopefully help someone out in the Inter-Webs.

The first is some text you can add to the end of your site URL that takes you to a hidden Web Parts Maintenance Page.  This is a great trick if you are having issues with a web part on a page, or if an end-user has tried to insert multiple copies of the same web part.  This will also show you if anyone has chosen to "hide" the web part from the page (which might be causing a problem) instead of deleting it.

Simply add "?contents=1" to the end of the URL of the page, for example: 

My next trick came about when someone in leadership asked me to provide a list of all the site collections.  We have hundreds spread across multiple content databases.  Powershell is one of those things that's incredibly useful for all levels of SharePoint Administrators.  In the following commandlet, you will get a list of all the site collections for a particular content database:

Get-SPSite -Limit All  -ContentDatabase contentdbname | select url, @{label="Size";Expression={$}} 

Along the same lines is a good commandlet to run if you ever want to export all sites within a web application.  Again, we have thousands of sites across hundreds of site collections and many content databases, so this gives you a nice spreadsheet of all the sites:

Get-SPWebApplication | Get-SPSite -Limit All | Get-SPWeb -Limit All | Select Title, URL, ID, ParentWebID | Export-CSV C:\localhost.csv -NoTypeInformation

The final trick I'll post today is a way to see an entire list of all users that have ever logged into your SharePoint web application.  It is a hidden User Information List that comes in handy if you ever have any discrepancies with a user not displaying a proper name or if you simply want to remove them from the entire site collection.

Simply add "/_catalogs/users/simple.aspx" to the end of the root site URL.  This will display the User Information list, for example:

I hope these help you in your SharePoint Adventures.  I will post more of these as I come across them.

No comments:

Post a Comment