简体   繁体   中英

Can you set a SharePoint site Locale and Languages using Powershell PnP

I am working on a Powershell script to create new SharePoint sites using the Pattern and Practices libraries . I need to change the locale and add an alternative language to "Classic Team" sites.

Is this possible with the PnP library?

Thanks.

You can use the get-pnpcontext cmdlet. So to add eg German (LCID 1031) to your sharepoint site you can use:

$Context = Get-PnPContext
$Web = $Context.Web
$Context.Load($Web)
Invoke-PnPQuery

$Web.IsMultilingual = $true
$Web.AddSupportedUILanguage(1031)
$Web.Update()
Invoke-PnPQuery

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM