15/03/2012

Inherit custom master pages to subsites in Sharepoint 2010

 Open up your Sharepoint site
  • Go to Site Actions > Site Settings
  • First check the following
    Go to Site Collection Administration > Site Collection Features
  • Check if the `Sharepoint Server Publishing Infrastructure` is active. If it isn't you should activate it, because Sharepoint Server Publishing depends on it
 
  •  Open Manage Site Features  

 
  • Go to Look and Feel > Master Page
  • Select the custom master from the dropdown menu
  • Check the "Reset all subsites to inherit this site master page setting" checkboxes

 
  • Now all subsites will use the master page


07/03/2012

Troubleshooting Sharepoint 2010 User Profile Synchronization Error


When implementing my Sharepoint 2010 testlab I configured user profile synchronization. After a while I noticed that Sharepoint failed to import new user accounts from my Active Directory.
I checked the configuration in Sharepoint, which seemed allright. But when I checked the eventviewer I noticed some problems:

Log Name:          Application
Source:            FIMSynchronizationService
Date:              3/7/2012 9:38:10 AM
Event ID:          6801
Task Category:     (3)
Level:             Error
Keywords:          Classic
User:              N/A
Computer:          SRV1.contoso.com
 

05/03/2012

Add DNS records from the commandline

Dnscmd is a command-line interface for managing DNS servers. You can use this tool to script DNS configuration and management tasks.
 

To add an A record to an existing zone on your DNS server:
 

Syntax:
Dnscmd server_name /RecordAdd zone_name computer_name A IP_address
 

Example:
This will create an A record for sales.contoso.com with the IP address of 192.168.140 in the contoso.com zone on srv1.contoso.com
Dnscmd srv1 /recordadd contoso.com sales A 192.168.140


Forcing zone replication:
Dnscmd server_name /ZoneRefresh zone_name




Sharepoint 2010 Recycle Bin configuration

Sharepoint 2010 Web Applications make use of a second-stage recycle bin. This recycle bin is  configurated at Web Application level. When creating a new Web Application, the recycle bin functionality is activated by default with the following settings:
 
Recycle Bin Status:                         On
Delete Items in the Recycle Bin        After 30 days
Second Stage Recycle Bin               Add 50% of lice site quota
 
This configuration can be obtained from:
Central Administration > Manage Web Applicatons > [WebApp] > General Settings > General Settings. Scroll down to the Recycle Bin settings


How it works:

When a user deletes content, this content is moved to the first-stage Recycle Bin where it  can be restored by the user.  When the user empties the recycle bin or the retenetion period has been expired, the content will be moved to the second-stage recycle bin.
Once content resided in the second-stage recycle bin, it can only be restored by an Administrator. The content will stay in here until it is deleted by an Administrator or it is deleted by a timejob when the retention period has expired (30 days default). 


Second-stage Recycle Bin considerations
 
Take note of the storage aspect when configuring the second-stage recycle bin. By default, the second-stage Recycle Bin is on, and SharePoint limits the second-stage Recycle Bin size to 50 percent of the storage limit quota for the site collection. However, by default, new site collections have no quota applied, which effectively means that the second-stage Recycle Bin size is also unlimited.

Create site collection quotas to prevent this, or disable the second-stage recycle bin to prevent storage problems.

Note that: 
  • Second-stage recycle bin does not count towards the site collection quota 
  • First-stage recycle bin does count towards the site collection quota 
  • Disabling Recycle bin even for a minute will immediately flush all the data from both recycle bins and those contents are unrecoverable.
  • Disabling Recycle in at the web application level will still show the “Recycle Bin” link on all the pages but it wouldn’t hold any information to restore at the site or site collection level.

Change Sharepoint 2010 Central Administration Port

When you configured your Sharepoint environment, you chose a portnumber for the Central Administration website. This portnumber cannot be changed from the Central Administration itself. However you can change the portnumber using Powershell. 

The Set-SPCentralAdministration cmdlet is used for this. 

 Set-SPCentralAdministration -Port <PortNumber>
 
<PortNumber> = available port between 1023 and 32767



01/03/2012

Sharepoint: The Farm is Unavailable

So you have your Sharepoint 2010 farm up and running. You are ready to configure your farm with some nifty powershell commands. When you press enter to run the command you see the following error: 

"The farm is unvailable"

This spoils the fun, but how to solve this ? 
  • First check if you really are logged in with the correct account
  • Be sure that you're a farm administrator
  • db_owner and db_securityadmin on the config database
  • local admin on the server    

My guess is that you made a small mistake in one of these items, it's easily solved and before you know it you're ready to show off with your powershell scripts