Configure the SP2013 server

I must say that I am not too fond of the Metro style in SharePoint 2013 and Office 2013. It looks very simple and ugly, but I will probably get used to it… I have always branded SP sites to have the company look & feel (which sometimes is hell as you all know who have worked with the css files), but in this version it does not feel necessary since it will be used on more mobile platforms and you don’t want too many design elements on those sites. So I do understand why the metro style is incorporated, but it is still ugly 🙂

Now the fun part begins, configuring your first SP 2013 server!! This is the first screen that loads after you have run the Configuration Wizard

I want to setup all databases my self so that I can have a better naming standard than the wizard gives. So hit the Cancel button and start creating dbs!

You come to the Central Administration first page and my eyes are drawn to the new section of CA: Apps! Cool. There is a link both in the left side menu and as a section on the CA page. Guess they have not yet figured out what the icon should look like

Service Applications

But before I dig into the new stuff I must create the service apps and set everything up. The two default apps are “Application Discovery and Load Balancer Service Application” and the “Security Token Service Application”

Here are some news also, in the Service Application list (see red marks). And the Web Analytics db is gone from the list.

Search Service

I will start with the Search Service App. I used the same search account for all app pools since it is on my test server. The search service app created the following apps and the WSS_UsageApplication was in Stopped mode, just as in SP2010

The Search Application has a better organized left side menu, and some new stuff. Will dig into this more later. For now, I only setup the search schedules so I know that search is running. And there was this new setting: Continous crawling. No need to setup incremental crawls, I like! Enabled.

Managed Metadata

Created the Managed Metadata Service Application. No news there as far as I could see. When I clicked the link to open the Managed Metadata app I got a red error message that the Service or App Pool was not started. But I had started the Managed Metadata service so I did an IISRESET and that helped

User Profiles

Moving on to the User Profile Service App. I always create the MySite host from here

And now for the most exciting click, enter the new UPS app. Oh yeah, forgot, first start the SERVICES!! It is so annoying that the services for the common service apps don’t get started when you create them

Start the two services

A bit simplified interface. Just add the farm account and password

And wait for that “Starting” to change into “Started”…. always exciting…. Now get a coffee or something, because this will take time

Wohoo! Some 20 minutes later, the service actually got started!

A few new links, other than that – you feel at home here

Created a new connection no change there! It is still quite slow to expand and collapse the AD containers 🙁

Creating the connection filter is the same as in 2010, same shit I would say. Not logical stuff in here at all, unless you are a true AD nerd. I always have to google this because I want to exclude the disabled accounts and you cannot guess your way to do that… This is what you have to set

UserAccountControl (wait…) Bit on equals 2

Top ribbon

There is a new top ribbon which I have not decided if I like or not, yet.. What I do like is the right part of it in the grey area with shortcuts to permissions and content in focus. All of the blue links seems to take you to MySite, now at least. And the left most is totally meaningless but I guess that will change.

Select experience

When you create a site collection, you can select Experience (2010 or 2013)

Working on it… (Puking on it)

This message is going to drive me mad, I am already sick of it!

And don’t be sorry FFS!! Arrrgh..
Seriously, are document libraries and lists to be called APPS now?
Share this blog post:

Installation steps SP2013 Preview

Launch the Splash screen

Install the prereq’s

Restart when asked

Continue installation after restart

Then launch Splash screen again, and install SharePoint Server 2013

You will first get this “error” message… you must restart before you can continue installation.

Enter the product key which you will find on this page:
Put the index files on another drive than system drive

I installed as a standalone the first time, but I got a lot of errors and problems so I uninstalled SP again. Installed as a Complete this time

Launch the Config Wizard

Create a new Server farm

 Specify sql db and farm admin account

If you get any SQL connection errors when you press Next here, then make sure the SQL services are running and that you have an instance setup. You need version 10.51.2500 of SQL Express (2008 R2).

Enter the passphrase
Confirm the port and authentication provider

Confirm configuration settings

The configuration tasks starts

Ended up with a Configuration failed and that a restart was necessary. Did that (this because I had upgraded my SQL express to R2 during setup)

Configuration successful

Now let the fun begin!

Share this blog post:

MOSS MA not found

I got this error when I clicked on “Create new connection” in the User Profile Services App, to setup a new connection to the AD. If you get it, just restart the User Profile Synchronization Services under “Services on Server” in CA.

Share this blog post:

Customize the workflow mail

I have a workflow that sends a mail to the users when ever a list item is edited and a specific field is updated. I don’t want the users to access the list, so I built a simple workflow to send a mail to them instead.
The challenge is to make the mail look like it does in the list item and with some extra branding added. To make this happen you need to add the HTML code in a very specific way, otherwise it will look like crap and the HTML code will be visible in the mail.

Add the “Send an email” action in the workflow
Click on “Advanced properties” in the ribbon, or hover the action and click on “Properties”:

In there, click on the .. button on the Body row:

Now comes the important part: if you want to add your own css classes in a style tag, you need to remove ALL space in that style tag, otherwise they will be displayed in the mail and css is not incorporated. Like this:

You can have a space before the next .class, that works, but all other spaces needs to be removed.
Then just copy and paste the rest of the HTML code into the body and it should work fine.

Share this blog post:

News feed with CQWP

How come I always tell the company I work or consult for, that I am not a developer.. and then I always end up developing stuff anyway? For my part, it is more of a frustration part, because it takes so much time to develop than to use the out of the box functionality. But sometimes out of the box is just not enough.

The last few months I have been working on setting up a SP 2010 server farm from scratch, setting up a new intranet, branded it, structuring it and… developing some parts like the News rollup. I have used the CQWP and it is so powerful, I love it. I have built kind of a Facebook news stream with it, that rolls up news from all departments, the site image and source where the news comes from and also ratings and news images.

This is the result:

And here is an explanation of the parts on the news webpart:

This is how I built the CQWP:

I have built a custom news page layout, where I have a site column called “Siteimage” where I store the actual site image. (The site image is marked with a red number 1 in the image above). So there will be different site images depending on where the news are created. In this case I have for example a picture of a vessel if the news comes from a vessel site. And that is how Facebook news feed works, you have the source image to the left in the news feed (the profile picture) and if you click on the news you will land on that persons wall. This works the same way, but you will land on the site where the news was created.

Red number 2 in the picture above shows that I have selected the Title and Byline and the title is the URL to the news page.

Then I have added the site title (our sites are named by department), the Author and the Article Date as red number 3 shows in the picture above.

Of course any thumbnail photos are displayed and you can make them clickable so they enlarge on click (red number 4 in picture above)

And last, I wanted to add the ratings since I like the social interaction also. Red number 5 in pic above, if not obvious 🙂 In fact, I also have added the Note board to our news, so if you open the news page you can post comments on it. I have not added the “Comments” though on the front page, since I have not found any good way to do that. I don’t think the Note board comments are connected to the page itself, but maybe someone out there knows? I have found a way to display comments on Blogs, but not on Page libraries.

My next news project will be based completely on Blogs. There are many reasons for that: it is so easy to blog (and use Word if the user wants to), the entire news is displayed, you can display ratings and number of comments, I have built the similiar news feed as above but using Blog instead.

I really like the CQWP but I wish it was even more flexible and that you could perform lookups on custom fields and values a bit easier. And maybe a drag and drop GUI to build the CQWP without having to export and import it, copy and modify xsl etc. Also, you need to be very creative and use your imagination to find the solution on how to bring out the stuff you want to show in your CQWP.

Share this blog post:

Setup connection filter on AD

If you want to reduce the amount of user profiles that are imported from AD, then a good way is to filter the AD connection. Then you can filter out disabled accounts and for example, accounts that does not have a mail address. Go to you AD connection in the User Profile Service Application and hover the name of the AD connection. Click on “Edit connection filters”:

To filter out disabled accounts, select “userAccountControl” from the Attributes list, and wait for the page to reload.

Then select “Bit on equals” and set it to “2” (without quotation marks)


To filter out accounts that does not have a mail address, select “mail” from the Attributes list and wait for the page to reload.
Then select “not present” from the Operator list.

Share this blog post:

Cmdlets I use most often

I love the power of PowerShell. And I use it a lot to do stuff, it is much easier and faster than using CA. And I find myself googling Microsoft or other pages over and over for the same commands, because I simply cannot remember the parameters and it is faster to just google it. So I will add them here now, for my own convenience! Copy and paste away 😉


Install-SPFeature -path “MySiteLayouts”
Enable-SPFeature -Identity MySiteLayouts -Url https://sps
Uninstall-SPFeature “MySiteLayouts”
Disable-SPFeature “MySiteLayouts” -Url https://sps


Add-SPSolution E:SP_install_filesWebpartsWebPart.wsp
Install-SPSolution –Identity WebPart.wsp –WebApplication https://sps -GACDeployment

Delete a list by GUID

$w = Get-SPWeb “https://sps

Create a site using custom template

Get custom template ID
$url = “https://sps
$site= new-Object Microsoft.SharePoint.SPSite($url )
$loc= [System.Int32]::Parse(1033)
$templates= $site.GetWebTemplates($loc)
foreach ($child in $templates){ write-host $child.Name ”  ” $child.Title }

Create a new site with the custom template id
$newWeb = New-SPWeb -Url https://sps/newsite -Name “New Site Name”

Delete database

$del = get-spdatabase “9437afae-953a-4373-81dc-88186e0ec30e”

Get all site features and save them in a txt file

Get-SPFeature | Sort -Property Scope,DisplayName | FT -GroupBy Scope DisplayName,Id > E:outputAllInstalledFeatures.txt

Create new site and import cmp

New-SPWeb -url “https://sps/docs/
Import-SpWeb -identity “https://sps/documents/” -path “E:importsdocs.cmp” -IncludeUserSecurity

Import photo thumbnails from AD

Note: To be able to import the photos you need to first add an import of those in the User Profile Service Application. Go to User Properties, scroll down to “Pictures”, scroll down to the list of AD fields and select “thumbnailphoto”. Click on Import and add it. Save and do a full user profile import synchronization. Then you can run this command (I have this in Scheduled Tasks, it runs every night):

Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation https://mysites

Create State Service Application

New-SPStateServiceDatabase –Name “StateService” | New-SPStateServiceApplication –Name “State Service” | New-SPStateServiceApplicationProxy –DefaultProxyGroup

Start a Service Application

Often the WSS_Usage service application is not started by default when you install a new server.

$UP = Get-SPServiceApplicationProxy | where {$_.ID -eq “e31e3a1b-3c46-42d0-ad78-822cb48daafc”}

The GUID is the service application that is not started.

Share this blog post: