Sara Perrott

Windows Server 2022 & Powershell All-in-One For Dummies


Скачать книгу

rel="nofollow" href="#fb3_img_img_56c6dd66-adc4-57a0-851c-ce7c3c358341.png" alt="check"/> Performing a memory test on your server

      

Using the Command Prompt to troubleshoot

      

Troubleshooting with third-party boot utilities

      As a system administrator, you’ll get the inevitable call one day about a server that just won’t start. Maybe the server is in a continuous boot loop. Maybe the server just hangs. Your mission, should you choose to accept it, is to figure out why the system is having issues starting and then fix the issue.

      This chapter discusses basic tools and techniques to troubleshoot issues that are causing your system to not be able to boot properly.

      The first step to figuring out what’s going wrong with your system is to access the boot diagnostic utilities that ship with Windows Server operating systems.

      From the DVD

      

An ISO file is a duplicate of what’s on a physical disc.

      After you have the disc ready to go, you need to insert the disc or the USB flash drive into the server and boot from it. You may need to change the boot order on the server so that the boot order will start with the DVD drive or the USB flash drive before the hard drive. You can make this change by accessing the basic input/output system (BIOS). On server systems, this option is available when the system is booting. The key you have to press to access the BIOS will depend on the firmware manufacturer that created the BIOS or Unified Extensible Firmware Interface (UEFI). Some systems simply offer you a boot menu when you press F12, which allows you to select the DVD drive or USB flash drive for a one-time boot.

      When you’ve figured out how to boot from the DVD or USB flash drive, follow these steps:

      1 Boot from the DVD or USB flash drive.

      2 When you see the message Press any key to boot from CD or DVD, press any key.The installation wizard for Windows Server 2022 runs.

      3 On the first screen, click Next.This screen is just asking for language, time and currency format, and keyboard or input method. You can safely accept the defaults.

      4 On the next screen, you see the big Install Now button. Don't click that! Instead, look in the lower-left corner for the Repair Your Computer link (see Figure 2-1), and click that.

      5 On the next screen, click Troubleshoot.This gives you your available options (see Figure 2-2):Command Prompt: Allows you to do advanced troubleshooting and is especially helpful if you need to repair boot files. You can use the diskpart utility to work with the drive, and the bootrec command to rebuild or repair the boot files.System Image Recovery: Allows you to restore your system from an image created by a backup utility. You’ll be asked to choose a target operating system to restore, and then you’ll be shown available backups you can use.

Snapshot of looking for the Repair Your Computer link in the lower-left corner.

      FIGURE 2-1: Look for the Repair Your Computer link in the lower-left corner.

Snapshot of the Advanced Options screen.

      FIGURE 2-2: The Advanced Options screen.

      The Advanced Boot Options menu gives you, the system administrator, a number of utilities to troubleshoot various system issues.

      Advanced Boot Options is a menu that has been around in Windows operating systems for a very long time. There are two ways to get to it:

       The first option is the nightmare of every system administrator, in which the system has an issue, reboots, and then enters into the Advanced Boot Options menu, indicating that there was a problem.

       The second and less scary option is when a system administrator chooses to boot into Advanced Boot Options menu. This may be done for a number of reasons. I’ve done it to troubleshoot issues with drivers and to investigate and remove malware from a potentially infected machine.

      To enter into the Advanced Boot Options menu, follow these steps:

      1 Click the Start menu and then click the Settings icon.

      2 Click Update & Security and then click Recovery.

      3 Under Advanced startup, click the Restart Now button, shown in Figure 2-3.

      4 Click the Continue button.

      5 Click the Troubleshoot button.

      6 Choose Startup Settings.

      7 Click Restart.

      Safe Mode

      Safe Mode is almost always my go-to when there are boot issues with a system. Whenever new hardware or software has been installed, or if I suspect that a system may be having issues because of a malware infection, I turn to Safe Mode.

Snapshot of journey into the Advanced Boot Options menu starts with the Restart Now button.

      FIGURE 2-3: Your journey into the Advanced Boot Options menu starts with the Restart Now button.

Snapshot of the Advanced Boot Options menu, choosing what you want Windows Server to do.

      FIGURE 2-4: In the Advanced Boot Options menu, you can choose what you want Windows Server to do.

      The type of Safe Mode I use depends on what I need to accomplish. For instance, if I’m just troubleshooting an issue that I suspect may be related to drivers, most of the time I use regular old Safe Mode. In the following sections, I walk you through the different forms of Safe Mode and why you may want to use each of them.

      Safe Mode

      This