Set-PnPTenantSite -LocaleID does not change Locale ID
###Notice: many issues / bugs reported are actually related to the PnP Core Library which is used behind the scenes. Consider carefully where to report an issue:###
-
Are you using
Apply-SPOProvisioningTemplateorGet-SPOProvisioningTemplate? The issue is most likely related to the Provisioning Engine. The Provisioning engine is not located in the PowerShell repo. Please report the issue here: https://github.com/officedev/PnP-Sites-Core/issues. - Is the issue related to the cmdlet itself, its parameters, the syntax, or do you suspect it is the code of the cmdlet that is causing the issue? Then please continue reporting the issue in this repo.
- If you think that the functionality might be related to the underlying libraries that the cmdlet is calling (We realize that might be difficult to determine), please first double check the code of the cmdlet, which can be found here: https://github.com/OfficeDev/PnP-PowerShell/tree/master/Commands. If related to the cmdlet, continue reporting the issue here, otherwise report the issue at https://github.com/officedev/PnP-Sites-Core/issues
Reporting an Issue or Missing Feature
I search for any Onedrive sites with Locale ID 1033 Get-PnPTenantSite -IncludeOneDriveSites -Filter "Url -like '-my.sharepoint.com/personal/'" | Where-Object {$_.Lcid -eq "1033"}| select Url | ForEach-Object {
I add my account as owner to the Onedrive sites Set-PnPTenantSite -Url $_.url -Owners <MyAccount>
I set the LocaleID to 5129 Set-PnPTenantSite -Url $_.url -LocaleID 5129
Expected behavior
I expect the script to complete successfully and chanfe the Locale ID's to 5129
Actual behavior
The LocaleID does not change and I get the following message: Set-PnPTenantSite : The property Lcid cannot be set after the site template is set. At line:3 char:1
- Set-PnPTenantSite -Url $_.url -LocaleID "5129"
-
+ CategoryInfo : WriteError: (:) [Set-PnPTenantSite], ServerException + FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.SetTenantSite
Steps to reproduce behavior
Connect-PnPOnline -UseWebLogin -Url $adminUrl Get-PnPTenantSite -IncludeOneDriveSites -Filter "Url -like '-my.sharepoint.com/personal/'" | Where-Object {$.Lcid -eq "1033"}| select Url | ForEach-Object { Set-PnPTenantSite -Url $.url -Owners <MyAccount> Set-PnPTenantSite -Url $_.url -LocaleID "5129" }
Which version of the PnP-PowerShell Cmdlets are you using?
- [ ] PnP PowerShell for SharePoint 2013
- [ ] PnP PowerShell for SharePoint 2016
- [x] PnP PowerShell for SharePoint Online
What is the version of the Cmdlet module you are running?
3.18.2002.0
How did you install the PnP-PowerShell Cmdlets?
- [ ] MSI Installed downloaded from GitHub
- [x] Installed through the PowerShell Gallery with Install-Module
- [ ] Other means
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
@LangerMor There must be something amiss with NZ. When using that Lcid with New-PnPSite, the command fails completely. I logged that issue yesterday.
Same issue here, cannot use PNP to set all SP sites to UK Locale:
