How do I load a JavaScript file?
See Adding stylesheets (CSS) and JavaScript (JS) to a Drupal 8 theme. In your case, the library name is wrong. The right format for the name is module_name/libraries_name.

/**
 * Implements hook_page_attachments().
 */
function my_module_page_attachments_alter(array &amp;$attachments) {
  $attachments['#attached']['library'][] = 'my_module/my_module.admin';
}