Private/RSOP/_OnRSOPSourceInitialized.ps1

function _OnRSOPSourceInitialized {
    $RSOP_CredentialsStatusBarItem.Content = "Running as $UserName"
    $RSOP_LoadingLabel.Visibility = 'Hidden'
    # Load users and computers
    try {
        if (!($AllUsers)) {
            _UpdateObjectCache -Force
        }

        if (!($AllComputers)) {
            _UpdateObjectCache -Force
        }
    }
    catch {
        $ErrorString = 'Unable to load objects.'
        _ShowMessageBox -MessageText $ErrorString -ButtonType 'OK' -MessageIcon 'Warning' -MessageTitle 'RSOP Object Error'
    }

    foreach ($User in $($AllUsers | Sort-Object Name)) {
        $RSOP_UsernameScopeComboBox.Items.Add($User.SamAccountName)
    }

    foreach ($Computer in $($AllComputers | Sort-Object Name)) {
        $RSOP_HostnameComboBox.Items.Add($Computer.Name)
    }
}