Create the default groups via PowerShell

If your site is missing the three default groups “Visitors”, “Members” and “Owners”, you can create them easily with PowerShell or the Object Model. Add-PSSnapin Microsoft.SharePoint.PowerShell $web = Get-SPWeb https://your.site.url if ($web.AssociatedVisitorGroup -eq $null) { Write-Host 'The Visitor Group does not exist. It will be created...' -ForegroundColor DarkYellow $currentLogin = $web.CurrentUser.LoginName if ($web.CurrentUser.IsSiteAdmin -eq $false){ Write-Host ('The user '+$currentLogin+' needs to be a SiteCollection administrator, to create the default groups.') -ForegroundColor Red return } $web.

Update to the SharePoint Solution Deployer

A new version is out. If brings some great new extensions (two of them are from me 🙂 ) v5.0.4.6440 (2015-04-04) New: All extensions added: Blocked file extensions, content type hub, custom crawl connector, features, logging configuration, managed metadata, re-ghost, search schema, secure store, site structure, CSOM extensions for files and 2013 workflows Updated: SharePointVersions.xml Updated: Typos in comments fixed and some code clean-up First release based on GitHub repository Grab your version from http://spsd.

ReSharper plugin “reSP”

I won’t discuss the advantages of ReSharper (R#) in this post. But I’d like to point to a great plugin. reSP. It will inspect SharePoint specific details. It knows e.g. the SPBuildInFieldId class and hints you to use it. Great stuff 🙂

Speaker auf der ShareConf

Gute Nachrichten. Beide meine Sessions wurden angenommen. Ich werde also zwei Sessions auf der ShareConf halten. Ab in die Cloud – Migrationserfahrungen Wie migriere ich Dienste von einer On-Premise Installation in die Cloud. Wohin mit Mail, SharePoint Blogs, Team Foundation Server und Backups? Warum überhaupt in „die Cloud“ und was ist dabei zu beachten? SharePoint-Performance aus der Sicht eines Entwicklers Sie sind Entwickler, arbeiten mit SharePoint und möchten mehr über die Arbeitsweise von SharePoint wissen?

Als Aussteller auf der ShareConf

Auf der ShareConf im Juni wird arvato Systems mit einem eigenem Stand vertreten sein. Über die Themen werde ich noch infomieren 🙂 Ob ich wieder mit einem (oder zwei) Vorträgen dabei bin, weiss ich leider auch noch nicht. Ich warte noch auf eine Zusage für meine eingereichten Sessions.

Redirect browser to a sub directory with WordPress

My blog is running with WordPress in the sub directory blog of my domain. If you, as a visitor, forget to enter /blog, this little index.php file in my root directory will redirect your browser to the sub directory. <?php @include("sitefunctions.php"); /* Move page with 301 http status code*/ movePage(301,"http://www.hezser.de/blog"); ?> You’ll need a sitefunction.php file with this content as well. The status code can be adjusted to your needs.

The SharePoint Solution Deployer

Deploying Solutions can be a …. (fill in as you wish). The SharePoint Solution Deployer offers a great opportunity to writing your own scripts. The existing functionality should match your needs to deploy SharePoint Solutions. If not, the “framework” can be extended with custom Extensions or simple PowerShell code. I’ve written two Extensions, which let you enable and disable features upon deployments and reset files to their site definitions (aka ReGhost).

Use a XML-file for configuration in PowerShell scripts

Time for some PowerShell! Almost every PowerShell script need some configuration parameters. With this post I want to show one way, there are others ;-), to parse a config file in XML format and use the values later. The solution I’m going to show to you contains three files. A PowerShell script, a XML configuration file and a helper PowerShell file that contains a function to parse the config file.

Format SourceCode to output HTML

In case you need a quick solution to generate HTML from SourceCode, take a look at this page: http://hilite.me/ Copy the generated HTML and you’ll have nicely formatted SourceCode

R# 9 is out

ReSharper 9 is out 🙂 The Installer brings along other tools, so you don’t have to download them seperately. More infos here: http://blog.jetbrains.com/dotnet/2014/12/05/resharper-9-is-released-along-with-dottrace-6-dotcover-3-dotmemory-4-2-and-dotpeek-1-3/

Getting the PageTitle

Getting the PageTitle of a page should be just a property away would you think. I would call Page.Title to get the title of the current page. Unfortunately Page.Title contains “\r\n ” and the title of the page is in a new line, like this: <title> RH Test </title> The property will only return the first row, which is not very helpful 🙁 So what can we do? Since the title is set through a control within a ContentPlacehoder, my way was to get the control and take the value from it.

Treffen der SharePoint Usergroup OWL am 9.12.14

Am 9.12. ist es wieder soweit. Derzeit sind zwei Vorträge gesetzt: SharePoint Hosting – Ist die Cloud schon geeignet dafür? von Daniel Lindemann (ITaCS GmbH) Das Spannungsfeld Development-Operation im Umfeld von SharePoint Hosting von Andre Tomasiewicz (arvato Systems) Wir treffen uns um 18h. Die Adresse lautet: An der Autobahn 200 33333 Gütersloh https://www.google.de/maps/dir//51.8841959,8.4429219/@51.8834721,8.4421559,17z?hl=de Da der Raum sich auf dem Firmengelände befindet, ist eine namentliche Voranmeldung erforderlich.

Updating the title within a SPItemEventReceiver with AfterProperties

Recently I had a problem setting the title field of a Page within the pages library. My requirement was to set the title with the value from the PageTitle field of the current item. An ItemEventReceiver, which is executed synchronously to prevent save conflict exception or problems with published items, was supposed to do exactly that. But when I set the title property of the item via AfterProperties, the value did not get stored.

.NET goes OpenSource!

Das sind doch mal hervorragende Neuigkeiten! Microsoft hat im Rahmen seiner Online-Konferenz connect(); am Mittwoch bekannt gegeben, dass das komplette .NET Framework zukünftig als Open-Source-Software unter der MIT-Lizenz stehen wird. Quelle: http://www.heise.de/newsticker/meldung/Microsoft-NET-wird-komplett-Open-Source-2452033.html Das freut mich als Entwickler natürlich sehr. Dann können meine PI’s bald noch mehr durch Mono 🙂 Bisher wird per USB/RS232 der Stromzähler über die Infrarot-Schnittstelle ausgelesen 😉

Why I prefer WebApplication deployments over GAC deployments

This article is written with scope on SharePoint 2013. With SP 2013 the default TrustLevel in the web.config is set to “FullTrust”. On previous version the value is “WSS_Minimal”. When you develop Farm-Solutions for SharePoint, you can deploy assemblies to the Global Assembly Cache (GAC) or configure the solution for a “bin-Deployment”. The bin-way puts assemblies into the bin folder of the WebApplication, where the solution is deployed to. You can switch the target of the assemblies by modifying the properties of a SharePoint project.