Private/ComputerStats/_OnComputerStatsSourceInitialized.ps1

function _OnComputerStatsSourceInitialized {
    try {
        if (!($AllComputers)) {
            _UpdateObjectCache -Force
        }
    }
    catch {
        $ErrorString = "Unable to load objects.`n$_"
        _ShowMessageBox -MessageText $ErrorString -ButtonType 'OK' -MessageIcon 'Warning' -MessageTitle 'Computer Stats Object Error'
    }

    foreach ($Computer in $($AllComputers | Sort-Object Name)) {
        $ComputerStats_ComputersComboBox.Items.Add($Computer.Name)
    }
    $ComputerStats_LoadingLabel.Visibility = 'Hidden'
}