Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get SharePoint 2016 base language and language packs. For more details see: https://andikrueger.wordpress.com/2018/02/26/sharepoint-2016-base-language-and-language-packs/
#Requires -RunAsAdministrator
function Get-SharePointLanguages
{
$baseLanguageKey = Get-Item 'HKLM:\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\16.0\ServerLanguage'
$baseLanguageValue = $baseLanguageKey.Property
if($null -ne $baseLanguageValue -and $baseLanguageValue.Count -eq 1)
{
$baseLanguageCulture = New-Object System.Globalization.CultureInfo([int]$baseLanguageValue[0])
Write-Host "SharePoint base language:" -ForegroundColor Green
Write-Host $($baseLanguageCulture.DisplayName)
}
$languagePackKey = Get-Item 'HKLM:\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\16.0\InstalledLanguages'
if($null -ne $languagePackKey)
{
Write-Host "SharePoint Language Packs:" -ForegroundColor Green
$languagePackKey.Property | ForEach-Object -Process {
$languagePackCulture = New-Object System.Globalization.CultureInfo([int]$_)
Write-Host $languagePackCulture.DisplayName
}
}
}
Export-ModuleMember -Function Get-*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.