The business requirement is quite simple: find a solution for SharePoint My Sites’ pictures.
After the implementation of the User Profile Service (a very good UPS deployment guide can be read on www.harbar.net), and adding data into the following fields in the Active Directory user’s profile:
- General Tab: First Name, Last Name, Office, Telephone, E-mail
- Organization Tab: Job Title, Department, Company, Manager
I was able to have all the My Site features up and running (displaying information about users, colleagues, organization hierarchy, search visibility– including skills).
But the big challenge remained: how to add the pictures in a standard way? The solution: the “thumbnailPhoto” field in the Active Directory profile.
The picture thumbnail can be uploaded directly into the Active Directory database, into the “thumbnailPhoto” field if we use a PowerShell script. For SharePoint 2010 the thumbnails need to be 144px * 144px (the SharePoint system will generate 3 thumbnail photos, for each user: 144*144, 96*96, 32*32).
The main idea behind this post is the wish of getting a configured SharePoint farm which has friendly and standardized names for the databases created during the configuration process.
Below I will post only the PowerShell scripts that I used to provision the services that don’t offer the possibility of configuring the database name(s).
If you are searching a fully automated SharePoint installation solution, please check AutoSPInstaller on CodePlex.
Central Administration Provisioning
The following script provisions the central administration. Run it on the first SharePoint server within your farm, on the server that is going to host the Central Administration web application.
The business requirement was: the intranet solution should use My Sites to display the user profiles and “My Newsfeed” but the creation of “My Content” site collection should be disabled.
To achieve this just open the Central Administration web site and navigate to the User Profile Service instance (Application Management – Service Applications – Manage Service Applications).
Click on Manage User Permissions link and uncheck the Create Personal Site check for both the groups that have permissions (NT AUTHORITY\Authenticated Users, All Authenticated Users).
Both SharePoint 2010 editions (Server and Foundation) don’t provide a built-in feature that activates jQuery in a site collection.
Adding jQuery to SharePoint might not present a high interest for a traditional intranet portal solution, but if we use the Publishing feature, especially in web sites, jQuery could help us to improve our users’ experience.
The easiest way to add jQuery is, of course, to edit the master page and add the following lines of code, before the closing </head> tag:
This code show his limitations if the computer of the user connecting to the SharePoint solution doesn’t have an active internet connection.
The Build of an Add-jQuery SharePoint Feature
A more elegant solution is to build a custom feature that injects the code in the “PlaceHolderAdditionalPageHead” content place holder, a content place holder that should exist on every SharePoint master page.
<asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server"/>