AutoSpInstaller XML to SharePointDsc Converter – Preview – Update 2018/04/19

Convert your existing AutoSPInstaller XML File to a SharePointDsc configuration

Advertisements

Today the first preview of a web based AutoSpInstaller to SharePoint DSC converter got released.

There are still some limitations, as the mapping of the xml file to SharePointDsc is not complete jet. This is a preview to demonstrate the capabilities.

The converter targets the following use case:

As a user with an AutoSpInstaller XML available I want want to switch to SharePointDsc.

Currently the converter is able to create a multi node SharePoint DSC configuration based on the input of the contents of the AutoSPInstaller XML file. The configuration will contain the following elements:

  • one node block for each server name. If you are using localhost mixed with real server names, there will be an additional node for localhost.
    • On each node the following configuration is placed:
      • SQLAliases
      • SharePoint Prerequistes
      • SharePoint Binary Installation
      • Farm create or join
  • The following components are currently extracted from the AutoSPInstaller xml file:
    • Basic Farm setup
    • Managed Accounts
    • Web Applications
    • Site Collections
    • Managed Paths
    • Diagnostics Logging Service
    • State Service Application
    • Sandboxed Code Service
    • Claims to Windows Token Service
    • Outgoing Mail
    • Distributed Cache
    • Workflow Timer Setting
  • Update 2018/04/19 – There are the following additions:
    • Creation of Application Pools for Web Applications, Search, Serivces
    • User Profile Service Application
    • Search Service Application
    • Managed Metadata Service Application

SharePoint 2016 base language and language packs

The basic stuff about SharePoint 2016 base language and language packs – Some thoughts about this topic

All over the world there are customers that want to install and use SharePoint in their preferred language (official language, e.g. in Germany it’s German). I can fully understand the backgrounds of this wish:

  • Not every employee speaks English
  • Not every administrator speaks English
  • Adopting a new System is easier, when it’s in the mother tongue.

The SharePoint 2016 sources are available in the following 24 languages. Additionally, there are the following 49 language packs:

Language Source Language Language Pack
Arabic x x
Azerbaijani x
Basque x
Bosnian x
Bulgarian x
Catalan x
Chinese – Simplified x x
Chinese – Traditional x x
Croatian x
Czech x x
Danish x x
Dari x
Dutch x x
English x x
Estonian x
Finnish x x
French x x
Galician x
German x x
Greek x x
Hebrew x x
Hindi x
Hungarian x x
Indonesian x
Irish x
Italian x x
Japanese x x
Kazakh x
Korean x x
Latvian x
Lithuanian x
Macedonian x
Malay x
Norwegian-Bokmal x x
Polish x x
Portuguese-Brazil x x
Portuguese-Portugal x x
Romanian x
Russian x x
Serbian x
Slovak x
Slovenian x
Spanish x x
Swedish x x
Thai x x
Turkish x x
Ukrainian x
Vietnamese x
Welsh x

There are many possible variations of base language and language packs.

I tend to install SharePoint with the Englisch Sources and prefer to install Language Packs afterwards!

The reason behind this philosophy: “Keep it simple!”

Working every day with different SharePoint farms can be challenging if the language of the SharePoint logs vary or the PowerShell commands do need to be modified to match the installed SharePoint language.

The tools available focus on English SharePoint sources:

…and I prefer Central Administration to be in English. The german translation does not feelt right 😉

What’s the best way to figure out the base language and the installed Language Packs?

I use the following PowerShell Script to figre out the base language and the installed Language Packs:

 

 

Matomo (Piwik) and SharePoint – Tracking on Sites with Minimal Download Strategy or Search

Using Matomo ‏(Piwik) with SharePoint is easy. Tracking the search can be challenging. In this post I describe a way on how to track your SharePoint search properly.

Using Matomo (Piwik) with SharePoint can be very straight forward. There is no need to install any extension for SharePoint or any .wsp solution. All you need is Piwik installation and some lines of JavaScript in a file and a bit of PnP PowerShell.

Piwik offers you a default JavaScript snippet that allows you to track a user on your web site. The default code will somehow look like this:


var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['enableLinkTracking']);
_paq.push(['trackPageView']);
(function () {
	var u = "//piwikserver.domain.de/";
	_paq.push(['setTrackerUrl', u + 'piwik.php']);
	_paq.push(['setSiteId', '1']);
	var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
	g.type = 'text/javascript';
	g.async = true;
	g.defer = true;
	g.src = u + 'piwik.js';
	s.parentNode.insertBefore(g, s);
})();<span id="mce_SELREST_start" style="overflow:hidden;line-height:0;">&#65279;</span>

As soon as you save this JavaScript code in file, you can get started with SharePoint tracking with the following steps:

  1. Upload this file to your SharePoint Root Site Collection and place it in the Style Library (Why? Regularly I use this lib as a on-premises CDN)
  2. Make sure the file is accessible
  3. Create a Script Link in the Site Collection you want to track.

For step 3 You can use the following PowerShell code to add a script link to your site collection:


Connect-PnPOnline -CurrentCredentials -Url https://mywebapp.domain.de
Add-PnPJavaScriptLink -Name SpPiwik -Url "/Style Library/SpPiwik.js" -Sequence 900 -Scope Site

With this setting you can track a user and gain basic insights about his flow through your website. The data you are gaining by now is very basic and there are some SharePoint only specialties:

Continue reading “Matomo (Piwik) and SharePoint – Tracking on Sites with Minimal Download Strategy or Search”

Configuration of PHP and MySQL on Windows Server with IIS

Recently I challenged myself to see how far we can go with PowerShell DSC and non Microsoft Products. My goal in this challenge was to install and configure PHP and MySQL on a blank Windows Server 2012 R2 offline server.

Why would someone do this?

Because I wanted gain a better understanding on how far PowerShell DSC configurations are useful in challenging tasks with non Windows or Microsoft Products. Another outcome should be a fully functional PHP server to host PIWIK for a SharePoint Farm.

Continue reading “Configuration of PHP and MySQL on Windows Server with IIS”

Angular Elements – the future of ngOfficeUiFabric

Vesa Juvonen gave a great keynote at the European SharePoint Conference in Dublin on Thursday last week . It was filled with many announcements supported by a fantastic speaker line up. The biggest news were about SPFx and ALM in SharePoint Online.

image
Keynote by Vesa Juvonen and Rob Wormald about Angular Elements in SPFx WebParts

The moment Rob Wormald from the Angular Team joined Vesa – very unexpected for a conference focused on Microsoft technology – great developments were inntroduced: Angular Elements.

Angular – A google project – is widely used in modern web development and currently there are no best practices available for using Angular in SPFx webparts. Currently the best option is: avoid using Angular in SPFx right now.

What are Angular Elements?

It’s Angular Components as web components. Web components can be used in SharePoint Modern Sites and any other JavaScript apps. The new elements will blend in every other framework.

This makes Angular Elements way more versatile in usage and handling in combination with other Frameworks like e.g. React.

The dependency on the virtual DOM and the way SPFx webparts go through a process of packaging, made the usage of Angular in SPFx webparts not attractive. If you were still going with Angular, there are very likely chances you will run into troubles or performance issues, when you try to insert more than one of your Angular SPFx webparts.

The biggest step with Angular Elements comes with: “How can it be used in a page?” The dependency on a root element becomes obsolete! This means Angular Elements is just plain JavaScript without any further dependencies after the step of compilation. This makes Angular Elements a valuable option in SPFx.

Whats the effect of this new Angular Elements for ngOfficeUiFabric?

In case you haven’t seen Andrew’s post: HERE! I think Andrew is one of the few people who can explain this difficult topic in an understandable easy way!
There are plans to start of with Angular Elements for ngOfficeUiFabric. I hope this ngOfficeUiFabric@Next project will start to fly soon.

Hackathon @ European SharePoint Conference 2017

This year’s hackathon was a blast. Stephan and I partnered with Thomas and Saulius to defend last year’s victory (See Vesa’s blog post).

ESPC17 Hackathon

The hackathon started off with Mike’s introduction and a quick review on the last year’s results. Mike loves to hack and you can feel his passion for programming, when he introduces the concept of hackathon: “There is no good hackathon without pizza and beer!” 🙂

The hackathon rules and experts to support the teams can be found here: ESPC Hacakthon

This year our new formed team came up with an idea to do something with bots and Office 365. In the end we tried to revolutionize support activities focused on Office 365: “SharePoint Assistant” was born.

SharePoint Assistent is a predictive QnABot that guesses what the user needs – based on prior usage of the bot or the current user context. The bot can be embedded in an SPFx Extension Webpart in any SharePoint Online site collection. Other options would be to integrate this bot in Teams, Skype and many more.

You can find the whole team and the result presentation in this devpost submission: SharePoint Assistant

The competitors had really great ideas and I was totally impressed by the winning teams solution – Our team was the follow up though.

The winning team used the SharePoint audit logs to create Yammer communities based on analysis. The solution was that impressive because they used fairly simple tools to automate the whole process. Flow, Excel, Data pools were the names of the most used tools.

Another team automated their process of coffee delivery to their offices. They integrated a small circuit board through an email flow into Office 365.

There were further more two solutions shown on how to create PDF documents form Excel or Word directly in an SPO library.

Hacking during the European SharePoint Conference is fun. It allows to break out of the day to day life, get to know new technologies and shows what’s possible with Office 365, Azure and the developers tool belt.

Thank you, Mike and VESA for making this possible!

The self-healing environment – PowerShell DSC for your SharePoint Ecosystem – Recap

During my preparations for Dublin I came across many topics in the Azure Automation world I wanted to automate as well. Currently the resources “on how to do this” are limited to the Microsoft Documentations available.

I planned to on-board a newly provisioned virutal machine in place and join this server into my automation account. A process I do on a day to day basis with development environments.

I tend to trash my virtual development machines on a regular basis. This process allows me to be assured that my systems are up to the customers requirement.
This means I upload the customer specific configuration and compile the DSC prior to joining the VM.
If you do already have a configuration in place and want to reuse this, you can go to step number 3.

What is the process of on-boarding a virtual machine to an Automation Account?

0. Login in to your Azure Account


Login-AzureRmAccount

1. Upload your latest DSC configuration to Azure Automation DSC

Uploading a configuration requires you to run the following PowerShell Script.

Import-AzureRmAutomationDscConfiguration -SourcePath "<Full Path to your Configuration>"`
-ResourceGroupName "<Your Resource Group Name>" `
-AutomationAccountName "<Your Automation Account Name>" `
-Published `
-Force `
-Verbose

2. Compile your configuration

After an successful upload you can start the compilation of your configuration. In case the configuration requires parameters, you can ass them into the cmdlet as hashtable:


$dscCompileParameters = @{ }

Start-AzureRmAutomationDscCompilationJob -AutomationAccountName "<Your Automation Account Name >"`
-ConfigurationName "<Name of your configuration>" `
-ResourceGroupName "< Your Resource Group Name>"`
-IncrementNodeConfigurationBuild `
-Parameters $dscCompileParameters `
-Verbose

3. Join a VM to your Azure Automation Account – using PowerShell

Register-AzureRmAutomationDscNode -AzureVMName "<Your VM Name>" `
-ResourceGroupName "< Your Resource Group Name>" `
-AutomationAccountName "<Your Automation Account Name >" `
-RebootNodeIfNeeded $true `
-NodeConfigurationName "<Your Node Configuration Name >" `
-ConfigurationMode "ApplyAndAutocorrect" `
-Verbose

Outcome

With these few lines of PowerShell you will be able to onboard a VM to Azure Automation and configure this machine to use a specific configuration.