SharePoint Dragons

Nikander & Margriet on SharePoint

Monthly Archives: January 2013

Setting a Reference to SharePoint 2013’s Microsoft.SharePoint.dll

A quick tip: someone asked us how to set a reference to Microsoft.SharePoint.dll, because searching for the terms how to set reference to server object model in “sharepoint 2013” didn’t provide results. A simple thing. Just add a reference and click Extensions, like so (don’t forget to set the platform target to x64, otherwise it won’t function correctly without really telling you):

image

SharePoint 2010: Enable-SPFeature vs good old stsadm

Installing SharePoint 2010 features via SharePoint solutions can easily be done via the good old stsadm tool, using something like this:

stsadm -o addsolution -filename mine.wsp
stsadm -o deploysolution -immediate -name mine.wsp -allowGacDeployment
stsadm -o execadmsvcjobs
iisreset

stsadm -o activatefeature -name mine -url http://mysrv
iisreset

The equivalent in PowerShell is also pretty easy, doing something like this:

Add-SPSolution “C:\software\myfolder\mine.wsp”
stsadm -o execadmsvcjobs

Install-SPSolution –Identity mine.wsp –GACDeployment
stsadm -o execadmsvcjobs

Enable-SPFeature –Identity mine –url http://mysrv
stsadm -o execadmsvcjobs

For symmetry purposes, and if you work in IT you need to have some love for symmetry, we’re also including how uninstalling it via both stsadm and PowerShell. First, the stsadm tool:
stsadm -o deactivatefeature -name mine.wsp -url http://mysrv
iisreset

stsadm -o retractsolution -name mine.wsp -immediate
stsadm -o execadmsvcjobs
stsadm -o deletesolution -name mine.wsp -override
iisreset

In PowerShell, installing goes like this:
Disable-SPFeature –Identity mine –url http://mysrv
stsadm -o execadmsvcjobs

Uninstall-SPSolution –Identity mine.wsp
stsadm -o execadmsvcjobs

Remove-SPSolution –Identity mine.wsp
stsadm -o execadmsvcjobs

Optionally, check out if it worked by getting a list of all features for a site collection:

get-spfeature site http://mysrv

Now, let’s get on to the reason we wrote the blog post. What should you choose: Enable-SPFeature or the good old stsadm tool? Surprisingly, when it comes to actually activating features, we’re going go with the good old stsadm tool.

Why? The Enable-SPFeature PowerShell command doesn’t give extensive feedback regarding everything surrounding the feature activation. In other words, it might tell you that feature activation succeeded, but won’t tell you anything if custom code in the FeatureActivated event receiver (which runs after feature activation) throws an exception. The execution of custom code in a FeatureActivated event receiver is usually the tricky part of an installation, so this is not ideal.

The stsadm equivalent of  the Enable-SPFeature PowerShell command, stsadm -o activatefeature -name mine -url http://mysrv , does provide this information and displays the error message of the exception. This is a lot more helpful and the behavior you’re typically looking for. More than that, it sure looks like the Feature Activation deployment step in Visual Studio 2010 does exactly the same thing.

In other words, when it comes to feature activation, we still prefer the use of the good old stsadm tool!

MCSM Certification

Recently, MS announced the new SharePoint 2013 exam plans and we found there’s lots of interest in the community. Yes, it’s going to be all different again. We contacted MS to shed some light on it, focusing on the new Microsoft Certificated Masters SharePoint (MCSM) certification. The most exciting thing is that there is now a hybrid format available of the exam, that only requires you to be away for a week (one week of instructor-led training at Microsoft headquarters in Redmond, Washington, USA, followed by ten weeks of twice weekly, four-hour remotely-delivered interactive training sessions, state-of-the art lab environments are provided during the eleven week training program), great if you have a family! Bare costs for the exam are $18,500 (look here for more info).

First, check out this: Microsoft Certified Masters SharePoint

There are some prerequisites. If you start training before December 31, 2013:

· MCSA: Windows Server 2012

For training starting on or after January 1, 2014:

· MCSA: Windows Server 2012

· MCSE: SharePoint

· MCSD: SharePoint Applications (not yet released)

Check out the Detailed course contents and Program overview briefing 

To view the upcoming schedule, click here

Napa shortcut note to self

Better not forget the shortcut in Napa for seeing all shortcuts in Napa: CTRL + ,

SharePoint Foundation Counters

Getting the path names of the various SharePoint Foundation Counters is easy using the following PowerShell command:

(get-counter -listset “sharepoint foundation”).paths

Once you have those it’s easy to retrieve their values using script, as Margriet describes at: http://gallery.technet.microsoft.com/PowerShell-script-for-59cf3f70#content

Ping Dragon for SharePoint 2010 (ppclient)

The Ping Dragon pings a SharePoint page, using Windows authentication. It will request a SharePoint page and returns the HTTP status code as well as the time it took the request to complete. Ping Dragon is a supporting tool for the forthcoming PressurePoint Dragon for SharePoint 2010, a performance/load/stress testing tool.

Ping dragon is easy to use, you need to start a command prompt and pass it the following parameters:

– URL of SharePoint page

– user name

– password

– domain name

Get the Ping Dragon at http://gallery.technet.microsoft.com/Ping-Dragon-for-SharePoint-70fb299e

Nominee Top 25 European SharePoint Influencers

We’ve been nominated for a contest, the text says this:

“Help us discover the most influential SharePoint community members in Europe

The European SharePoint Community will vote for the people that most influence their decisions when faced with SharePoint issues. These are the people that you look up to for their great insights.”

We don’t really think of ourselves in terms such as “influential” or “great insights”, but if you like our blog and can spare a click, it’d be fun to get in the top 25 and we’d appreciate a vote at http://goo.gl/h78Hp

SharePoint Foundation Current Page Requests

It’s interesting, when you look at the performance counter SharePoint Foundation Current Page Requests, whatever you do, whatever load you give it, it never surpasses the maximum of 2. Apparently SharePoint just queues all requests after that.

TeamViewer

TeamViewer is a nice tool for viewing or taking over another computer. If you use it for non-commercial tasks, its free: http://teamviewer.nl.softonic.com/.