Last week i had been struggling for hours trying to create a sharepoint online Sitecollection via PNP Powershell.
It was a Tenant with German language as Default.
I started the follwing script and indicated 1033 as LCID, which should create an english Sitecollection
New-PnPSite -Type TeamSite -Lcid 1033(English) -Alias $alias -Owners $owners
But, the site was on german.
When i call :
I find that the Site has 1031(german) as language…
I tried to create an english Site manually(via the Central administration) and all was fine, the site was created with the correct Language
I was using and App-Only authentification based on an Azure AD App.
Connect-PnPOnline -ClientId $clientId -Thumbprint $thumbprint -Tenant $tenant
How you connect should actually make no difference, but it unfortunately did….
The Sitecollection was created with the correct language if i use :
After searching a bit on internet, i found out that i am not the only one facing this problem, and i figured out that it is just a bug with PNP Powershell : Link
Unfortunately you need to change your authentification methode from App-Only to Delegate:
$encpassword = convertto-securestring -String $Password -AsPlainText -Force $cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $Login, $encpassword Connect-PnPOnline -Url $url -Credentials $cred