# group agents by version and sort
$configurationGroups = Get-SCOMPendingManagement | group AgentPendingActionType
#add a helper class to get the localized display strings
$langClass = New-Module {
$lang = (Get-Culture).ThreeLetterWindowsLanguageName
$mp = Get-SCOMManagementPack -Name Microsoft.SystemCenter.OperationsManager.SummaryDashboard
# Set localized language to ENU if the expected language is not found in MP
try
{
$temp = $mp.GetDisplayString($lang)
}
catch [Microsoft.EnterpriseManagement.Common.ObjectNotFoundException]
{
$lang = "ENU"
}
function GetLocalizedDisplayString($elementId)
{
$localizedName = $mp.FindManagementPackElementByName($elementId).GetDisplayString($lang).Name
if (!$localizedName) {$localizedName = $elementId}
$localizedName
}
Export-ModuleMember -Variable * -Function *
} -asCustomObject