Skip to content
2 min read

PnP PowerShell: Dependency on Profile Language

When working with PnP PowerShell, unexpected problems can occur due to language settings. In this post, you'll learn why the profile language is...

Author: JASP Team

When working with PnP PowerShell, unexpected problems can occur due to language settings. In this post, you’ll learn why the profile language is crucial and how to effectively avoid language-dependent difficulties.

The Problem

During various customer projects, a hard-to-explain problem occurred: “Sometimes” PnP commands didn’t show the expected behavior. For example, a developer could successfully update the description of a SharePoint page, but the changes weren’t visible to other users! Additionally, when exporting a page template with Get-PnPSiteTemplate, the names of document libraries, fields, and views were saved in English, even though the website was set to German.

The Cause

Both problems share the same cause: PnP commands are dependent on the language of the user executing the PnP script.

Which Language is Meant? SharePoint, Web Browser, or Delve?

The decisive language is that of the Microsoft 365 user profile, i.e., Delve.

The Solution: Avoiding Problems

With this knowledge, many language-dependent problems can be avoided. Before making an update to language-dependent fields or exporting a website template, ask yourself the following question: Which language am I set to? Updates and exports are always based on the language set in your Delve profile. For example, if you want to use a page template for a German website, make sure the user profile is set to German before starting the export. This way, names of document libraries and other objects are exported and imported in German. The same applies to column names and views. Also pay attention to language settings for page descriptions: In our example, the developer had an English profile and saw the website in English (browser also in English). Other users with German profile and browser couldn’t see the changes to the page description because only the English version of the string was changed by the PnP updates.

Conclusion

When using PnP PowerShell commands, it’s essential to consider the language of the user profile of the executing user. Detailed instructions for changing the language can be found in the Delve FAQs under “How can I change the language in Delve”.

Ready to Talk?

Let's talk about your project – no obligation, completely free.

Free Initial Consultation