Category Archives: SharePoint 2010

How to hide the “Make Homepage” button in the SharePoint ribbon

A TechNet Forum member was looking for help on hiding the “Make Homepage” button in the SharePoint ribbon. I provided the following XML to hide the button:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction
    Id="RemoveMakeHomePageButton"
    Location="CommandUI.Ribbon">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.WikiPageTab.PubPageActions.SetHomePage" />
      </CommandUIDefinitions>
    </CommandUIExtension>
  </CustomAction>
</Elements>

The following MSDN article provides additional guidance on getting started with customizing the Ribbon, Customizing and Extending the SharePoint 2010 Server Ribbon.

Optimizing your SharePoint Development VM for Solid State Drives (SSDs)

Once you upgrade to a Solid State Drive, there is no going back. Your VMs boots faster, your package deployments take mere seconds, and everything feels the way it should. Unfortunately there is a major drawback to a SSD, its lifespan.

Traditional Hard Drives are measured by “Mean Time Between Failures”, indicating the average lifespan of the drive in hours. As a reference point, The Western Digital Red NAS drive has an MTBF of 1 million hours.

Solid State Drives have a maximum number of times that each block can be written to. Once a block has reached its limit, the drive often fails with data recovery being next to impossible. To mitigate this problem, SSD controllers use a technique called Wear Leveling to help distribute which blocks are written to on any given IO operation. From my personal experiences, I have had my SSDs die after approximately 12-13 months.

To help reduce the unnecessary writes and to improve your SSD’s lifespan, the following can be done. Please note that these recommendations are strictly for personal Development VMs.

Disable Disk Defragmenter
Because SSDs can access the data directly (unlike HDDs that require seeking), defragmenting a SSD will not provide any performance improvement. However, it will cause a lot of unnecessary writes to your drive. Windows will automatically disable defragmentation when it detects an SSD, however Virtual Machines don’t always know what physical storage the Virtual HDs are running on. Turn off Scheduled Defragmentation to play it safe:

  • Windows 2008 R2
    1. Win Key + R
    2. %windir%\system32\dfrgui.exe
    3. Ensure that Scheduled defragmentation is turned off
  • Windows 2012
    1. Win Key + R
    2. %windir%\system32\dfrgui.exe
    3. Change settings
    4. Uncheck Run on a schedule
    5. Save & Close

Turn off SharePoint Logging
SharePoint ULS Logging is invaluable when troubleshooting a problem or observing a particular behavior, but otherwise the logs aren’t checked daily. I recommend turning on logging in your development environment only when needed. To disable diagnostic logging:

  1. Open Central Administration
  2. Navigate to Monitoring in the left navigation
  3. Click on Configure diagnostic logging
  4. Click on the checkbox next to All Categories
  5. Select None from both of the dropdowns at the bottom of the section
  6. Save and close

If you need to restore your logging, you can follow the same steps and select Reset to default from the dropdowns.

Disable Search Indexing
Independent of SharePoint’s search engine, Windows has its own search index. Disabling Windows Indexing can save some I/O, but it really comes down to personal preference. I like to keep my development environment well organized by client & project, and do not have files scattered all over the place. Disabling the index will allow for a slightly slower search to occur, which isn’t a problem since my scope is a specific folder. To disable Windows Search Indexing:

  1. Open Windows Explorer and navigate to Computer (Win 2008) or This PC (Win 2012)
  2. Right click on your Local Disk (C:) drive and click on Properties
  3. Uncheck Allow files on this drive to have contents indexed in addition to file properties

If you have any other tips & tricks that have worked well for you, please let me know!