Читать книгу Windows Server 2022 & Powershell All-in-One For Dummies - Sara Perrott - Страница 44

Using the Command Prompt

Оглавление

When all else fails, the Command Prompt is always there. I’ve had to troubleshoot many issues over the years where I was saved because the Command Prompt was available. Corrupted system files? Open the Command Prompt and run sfc /scannow. Damaged hard drive? Open the Command Prompt and type chkdsk /f /r.

In Table 2-1, I list some of the most helpful tools that I've used over the years. The majority of these commands need the Command Prompt to be running with administrator credentials. To run the Command Prompt as an administrator, choose Start⇒ Windows System, right-click Command Prompt, click More, and then select Run as Administrator, or if you can bring up Task Manager, you can choose File⇒ Run New Task and type cmd.exe.

TABLE 2-1 Troubleshooting with the Command Prompt

Name Command Description
System File Checker sfc /scannow This utility checks system files to see if they match what’s expected by comparing the signature of the system file on the server with the signature of a cached copy of the same file. The cached files are stored in a compressed folder located at C:\Windows\System32\dllcache. If a corrupt system file is found, it's replaced.
Check Disk chkdsk /f /r This utility repairs file system errors and marks bad sectors so the operating system doesn’t use them anymore. The /f will tell the utility to fix any issues it finds, and the /r will locate the bad areas (sectors) on the disk. This can take a while. Kick it off, and grab a cup of coffee.
Driverquery driverquery This utility queries the system for all the hardware drivers that are installed on Windows. This can be very helpful if you're running into issues with systems that have similar hardware and you want to know if they have a driver in common.
BCDEdit bcdedit This utility is covered in depth in Book 1, Chapter 4. For now, just know that it allows you to edit the boot configuration on your Windows server.
Windows Server 2022 & Powershell All-in-One For Dummies

Подняться наверх