Tool: Import Pictures for all you Profiles

11 March 2010 by Stef van Hooijdonk


Here at Tam Tam we are currently working on implementing SP2010 as our Portal and Customer Portal Platform.

We wanted to have all our Employee profiles to include pictures:

SP2010 stores Profile Pictures in the MySite Host. There is a Picture Library there called “User Photos”. Inside there is a Folder named Profile Pictures. If it is not, it just means no one has uploaded a Profile Picture yet.

Each profile picture comes in three flavours: _LThumb, _MThumb and _SThumb. SP2010 does this for you, through the Profile Property Editor for Profile Pictures.

So, with the help of Reflector, I wrote a small tool that would import all our profile pictures and update the user profiles. I created a small Forms application that would import the profile pictures, based on username.jpg pictures.

The magic hapens here, this code is by Microsoft actually, not me:

using (Bitmap bitmap = new Bitmap(num3, num4, PixelFormat.Format32bppArgb))
            {
                using (Graphics graphics = Graphics.FromImage(bitmap))
                {
                    graphics.CompositingMode = CompositingMode.SourceCopy;
                    graphics.CompositingQuality = CompositingQuality.HighQuality;
                    graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
                    graphics.DrawImage(original, 0, 0, num3, num4);
                    using (MemoryStream stream2 = new MemoryStream())
                    {
                        bitmap.Save(stream2, ImageFormat.Jpeg);
                        stream2.Position = 0L;
                        return folder.Files.Add(fileName, stream2, true);
                    }
                }
            }

If you want you can use the tool and the code by going here. It is a research project, not a product!

And now we have profile pictures for Tweets:

Organisational browser:

 

Do not import Disabled User Accounts with SP2010

9 March 2010 by Stef van Hooijdonk


If you have got the Profile Import working in SP2010, then you probably will wan’t to EXCLUDE disabled user accounts from the import.

Here is how:

Go to the “Synchronization Connections” page of the User Profile Service Application.

Click on your connection, and select “Edit Connection Filters”

You can add USER filters and GROUP filters, we want to add a User filter here.

Choose the attribute “userAccountControl”

Choose the operator “Bit on equals”

Choose as filter (value) 2

Click on Add

And Press on OK

Your next import will now exclude Disabled User Accounts.

Via: http://blogs.msdn.com/brporter/archive/2010/02/20/excluding-disabled-user-accounts-in-sharepoint-2010.aspx

FAST Query tool on Codeplex.com

8 March 2010 by Stef van Hooijdonk


Just made available on codeplex.com:

“Tool to query FAST for Sharepoint and Sharepoint 2010 Enterprise Search. It utilizes the search web services to run your queries so you can test your queries remotely from your local machine. It shows your results, allows you to refine your query (FAST), and page your results.

The FAST for Sharepoint MOSS 2010 Query Tool is a WPF client that allows a developer to explore the scopes and managed properties of a given SharePoint Search SSP, build queries in FQL, Keyword, or SQL Syntax, submit those queries and examine the raw web service results. This tool can be useful in building and troubleshooting your FAST and Sharepoint search queries.”

http://fastforsharepoint.codeplex.com/

MOSS 2007 and user Site delete nightmares

7 March 2010 by Stef van Hooijdonk


MOSS 2007 is not dead yet. If you have a MOSS installation where users can delete sites, you may want this.

http://governance.codeplex.com/releases/view/14351

This has been around for some time now, but still worth mentioning. Use the L.E. version, the other one seems to be giving other users some trouble.

They have other cool stuff also:
http://governance.codeplex.com/

Office 2010 and SharePoint 2010 on May 12th ?

5 March 2010 by Stef van Hooijdonk


Microsoft announced, via their blog, that may 12th will be the day the Office 2010 ( and SharePoint 2010 ) wave will hit us all.
Read on here:http://blogs.msdn.com/sharepoint/archive/2010/03/05/sharepoint-2010-office-2010-launch.aspx

SharePoint 2010 Profile Sync

5 March 2010 by Stef van Hooijdonk

During the rebuild of my Dev Environment with SP2010 (the RC version) I was unable to get the Profile Sync service to work with the local domain. “Starting” was all it did until if finally un-provisioned itself to Stopped.

After lots if fiddling and rebuilding I tried something different. The SP2010 RC prerequisite installation installs the infamous WCF hotfix, but now I installed the “Windows6.1-KB976462-x64.msu” before hand, and now the Profile Import Service will start!

It could also very well be that I now did a REBOOT between the prerequisites and the SP2010 installation.

image

image

View KB976462

Power of PowerShell and the SharePoint Snap-in

2 March 2010 by Stef van Hooijdonk


Recently I started to look into some more detail at PowerShell and the SharePoint 2010 Snap-in. As a small exercise I wanted to create something (somewhat) usefull.

I came up with a small site structure install script for SP2010.

First the source configuration, an xml, with the sites and subsites I wanted to created:

<?xml version="1.0" ?>
<site title="Test Portal" template="STS#0" lcid="1033" owner="sp2010\administrator">
    <features>
        <feature id="{22a9ef51-737b-4ff2-9346-694633fe4416}"/>
        <feature id="{f6924d36-2fa8-4f0b-b16d-06b7250180fa}"/>
        <feature id="{94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb}"/>
    </features>
    <webs>
        <web url="Subsite1" title="Subsite 1" template="STS#0" lcid="1033" />
        <web url="Subsite2" title="Subsite 2" template="STS#0" lcid="1033">
             <webs>
                <web url="SubSubsite1" title="SubSubsite 1" template="STS#0" lcid="1033" />
                <web url="SubSubsite2" title="SubSubsite 2" template="STS#0" lcid="1033" />
            </webs>
        </web>
        <web url="Subsite3" title="Subsite 3" template="STS#0" lcid="1033">
            <webs>
                <web url="SubSubsite1" title="SubSubsite 1" template="STS#0" lcid="1033" />
                <web url="SubSubsite2" title="SubSubsite 2" template="STS#0" lcid="1033" />
            </webs>
        </web>
     </webs>
</site>

Next I wrote two helper function inside my PowerShell script:

function ActivateFeatures([System.Xml.XmlNode]$node){
    #features for current web
    $features = $node.selectnodes("./features/feature") # XPath is case sensitive
    foreach ($feature in $features) {
        $fid= $feature.getAttribute("id")
        write-host -f blue "Activating Feature $fid at $baseurl"
        Enable-SPFeature -Identity "$fid" -Url $baseurl -Force
    }
}

function ParseNode([System.Xml.XmlNode]$node){
    $url = $node.getAttribute("url")
    $title = $node.getAttribute("title")
    $lcid = $node.getAttribute("lcid")
    $template = $node.getAttribute("template")
    $baseurl = "$baseurl$url"

    write-host -f red "Going to create site at: $baseurl with Title: $title"
    New-SPWeb -Url "$baseurl" -Name $title -Template $template -Language $lcid

    ActivateFeatures($node);

    # add a trailing slash to create urls
    $baseurl = "$baseurl/"

    # sub webs
    $subnodes = $node.selectnodes("./webs/web") # XPath is case sensitive
    foreach ($subnode in $subnodes) {
        ParseNode($subnode)
    }
}

First remove the existing site collection:

$baseurl ="http://portal.sp2010.com"
Write-Host -f Red "Removing Site Collection at $baseurl"
Remove-SPSite $baseurl

And then start reading the xml file and start creating a site collection

write-host -f green "Opening sites.xml"

[System.Xml.XmlDocument] $xd = new-object System.Xml.XmlDocument
$file = resolve-path("./sites.xml")

$xd.Load($file)

#site collection
$sitenode = $xd.selectsinglenode("/site") # XPath is case sensitive
$title = $sitenode.getAttribute("title")
$lcid = $sitenode.getAttribute("lcid")
$template = $sitenode.getAttribute("template")
$owner = $sitenode.getAttribute("owner")

write-host -f red "Creating Site Collection at $baseurl"
New-SPSite -Url "$baseurl" -Name $title -Template $template -Language $lcid -OwnerAlias $owner
ActivateFeatures($sitenode);

# add a trailing slash to create urls
$baseurl = "$baseurl/"

# subwebs
$nodelist = $xd.selectnodes("/site/webs/web") # XPath is case sensitive
foreach ($node in $nodelist) {
    ParseNode($node)
}

write-host "End of sites.xml"

And add this to the top of your SP2010 PowerShell Script to always load the Snap-in.

$snapin="Microsoft.SharePoint.PowerShell"
if (get-pssnapin $snapin -ea "silentlycontinue") {
    write-host -f Green "PSsnapin $snapin is loaded"
}
elseif (get-pssnapin $snapin -registered -ea "silentlycontinue") {
    write-host -f Green "PSsnapin $snapin is registered"
    Add-PSSnapin $snapin
    write-host -f Green "PSsnapin $snapin is loaded"
}
else {
    write-host -f orange "PSSnapin $snapin not found" -foregroundcolor Red
}

You can download both files here: codeplex.com

SPDisposeCheck and SharePoint 2010

24 February 2010 by Stef van Hooijdonk


Did you know the SPDisposeCheck tool?

Well on the product blog is a great post on Disposing and SP2010. named “SharePoint 2007/2010 ‘Do Not Dispose Guidance’

And even more usefull: SPDisposeCheck using Static Analysis in TFS ( 2010 )

You can download SPDisposeCheck as FxCop Ruleset here.

New Features of Forefront Protection 2010 for SharePoint

24 February 2010 by Stef van Hooijdonk


Forefront Security for SharePoint has been renamed to Forefront Protection 2010 for SharePoint.

Listed below is the overview and new features of the product:
“Microsoft Forefront Protection 2010 for SharePoint helps prevents users from uploading or downloading documents containing malware, out-of-policy content, or sensitive information to SharePoint libraries. Using multiple antimalware scanning engines from industry-leading security partners combined with file and keyword filtering, Forefront Protection 2010 for SharePoint provides comprehensive protection against the latest threats. The product integrates with SharePoint technologies to provide high performance, easily customized protection optimized for SharePoint collaboration environments.”

Read more: http://sptwentyten.wordpress.com/2010/02/23/new-features-of-forefront-protection-2010-for-sharepoint/

Read more on the new Forefront Threat Management Gateway 2010

http://www.microsoft.com/downloads/details.aspx?FamilyID=E05AECBC-D0EB-4E0F-A5DB-8F236995BCCD&displaylang=en

TFS 2010 and Scrum?

23 February 2010 by Stef van Hooijdonk


As we are using TFS 2010 RC to do our SP2010 RC projects, we are looking into using Scrum for TFS.

Found this download, a TFS Template for SCRUM for the TFS 2010 RC:

http://scrumforteamsystem.com/cs/forums/4767/ShowPost.aspx

Info is available in this forum.

Via http://twitter.com/pjotr80

More info on Visual Studio 2010 and TFS 2010

http://www.microsoft.com/visualstudio/en-us/products/2010/default.mspx

SharePoint 2010 on your Windows 7 Series phone

22 February 2010 by Stef van Hooijdonk


Daniel found this nice screenshot/mockup of windows 7 phone series showing the Office (2010) hub . Including SharePoint ( SP2010) tab.

Via Daniel;

iPhone and SharePoint

20 February 2010 by Stef van Hooijdonk


Newsgator just announced that it will be delivering a iPhone and iPad client for accessing your SharePoint sites on the go.

“The iPhone client, and a companion client for the soon-to-be-released iPad, provide on-the-road users with direct access to their enterprise social computing environments without the need for a browser, an extra layer of software that can complicate a work session. As a mobile client for NewsGator Social Sites, the social computing environment most deeply integrated into the SharePoint collaboration platform, the iPhone client accesses all the relevant updates from the user’s colleagues and communities.”

This client is for Newsgators Social Sites addon for MOSS 2007. It wonder if they will release a similar client for the social stack in SharePoint 2010 (SP2010) when it RTMs or if they release there own social stack for 2010.

To access your SharePoint sites right now you could use iSharePhone already, but that app hasn’t received the best of feedback.

SP2010 Branding on msdn

19 February 2010 by Stef van Hooijdonk


MOSS 2007 had the minimal masterpage, now SP2010 has the Starter  Master page.

“This master page is meant as a starting point for creating master pages for Microsoft SharePoint Foundation 2010. Most of the controls on the page are hidden. You can move these controls into other locations based on your design. You can find the default controls in the v4.master page that ships with the product.”

Head over to MSDN: http://code.msdn.microsoft.com/odcSP14StarterMaster

Via: http://twitter.com/pjotr80

http://blog.drisgill.com/2010/02/microsofts-sharepoint-2010-starter.html

Outlook 2010 Social connector for LinkedIn

17 February 2010 by Stef van Hooijdonk


LinkedIn released a social connector for Outlook 2010. Get yours now:

http://www.linkedin.com/outlook

If you have Outlook 2007, get the Outlook Social Connector first

http://www.microsoft.com/downloads/details.aspx?FamilyID=c87e257c-d76f-4785-a09b-af36babd6e32&displaylang=en

Microsoft already announced that Facebook and MySpace will be available also in the near future.

What is a Social Connectors for Outlook ?

“Stay up-to-the-minute with the people in your networks by accessing everything from e-mail threads to status updates in one single, centralized view.”

Facebook won’t deliver a Social Connector for Outlook.

SP2010 “System.ServiceModel.EndpointNotFoundException” from OWSTIMER

10 February 2010 by Stef van Hooijdonk


If you get this error on your SP2010 server or Dev machine:

“System.ServiceModel.EndpointNotFoundException” in OWSTIMER.exe

Chances are that you succesfully enabled Profile Import! But the “Forefront Identity Manager Service” is stopped for some reason. Could be due to a reboot timing issue with an unavailable SQL Server.

This service is actually the exe ”Microsoft.ResourceManagement.Service.exe”

And if you were to debug the OWSTIMER exception you would see that the exception is:

Could not connect to http://devsp2010:5725/ResourceManagementService/MEX.
TCP error code 10061: No connection could be made because the
target machine actively refused it 10.0.1.8:5725.

So just go ahead and start the “Forefront Identity Manager Service” and your exception will not come back. You can do this through services.msc or

net start fimservice