Skip to content

Instantly share code, notes, and snippets.

@andikrueger
Last active February 26, 2018 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andikrueger/157f6c5c8213a8b7ad71cb0de82b5f71 to your computer and use it in GitHub Desktop.
Save andikrueger/157f6c5c8213a8b7ad71cb0de82b5f71 to your computer and use it in GitHub Desktop.
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