Skip to main content

Windows search is not working properly.

 This PowerShell script resets the Windows Search feature and closes the PowerShell window when the "Done" message appears. If you receive an error message stating that running scripts is disabled on your system, enter the command Get-ExecutionPolicy and press Enter. The current policy, such as Restricted, should be noted for future use. After the policy change is completed, close the PowerShell window and repeat steps 2–4. When the "Done" message appears, press any key to continue. To revert to your previous PowerShell execution policy setting, enter the command Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy and press Enter. Return to your previous policy setting by pressing the Spacebar, enter the policy value you noted in step 5, and press Enter. This will allow the script to make changes to your device. Remember to press Y and Enter to accept the change and revert to your previous policy setting. Close the PowerShell window when you're done. DOWNLOA...

The Windows system screen error is a corrupt issue.

 

How to run DISM commands to repair Windows

BYshohrab Ansari

DISM and SFC are powerful Windows commands that you can use to troubleshoot or repair system images

Both Windows 11 and Windows 10 feature a built-in Deployment Image Servicing and Management tool, better known as DISM. A stable Windows build relies on a healthy foundation of core files that ensure everything runs as expected. However, sometimes Windows can develop unexpected issues over time. That's where DISM comes in as a powerful tool.

DISM has long been used by system admins to configure, tweak, and even repair system images. If you learn how to use it, DISM can help you solve a wide variety of system problems. It can even sometimes help in fixing a Windows BSOD (blue screen of death). In this guide, we'll break down how this tool works and the various ways that you can use it.

What is DISM?

If you are interested in a more technical understanding of DISM, here's the gist of it: DISM mainly works by managing data included in the Windows image. That image is a compressed representation of the Windows operating system, including system files, boot configuration, and drivers.

DISM helps take account of updates, drivers, applications, and corrupted files within that Windows image. It can be used to check system health, scan for serious issues, and repair damaged files. This command tool can be used with multiple options, such as CheckHealthScanHealth, and RestoreHealth. We'll touch on all these in their respective sections.

Using DISM commands won't erase your data or programs, but we still recommend you back up Windows as you will be making system changes.

Check System Health Using DISM

This is the most basic command that you can use with DISM. The DISM CheckHealth command searches for any file corruptions in the local Windows image. Think of it as a diagnostic tool that helps you troubleshoot potential issues and their causes. Just remember that it won't fix any issues on its own.

1. From the Start menu, search for Command Prompt.

2. Right-click the first result, and select Run as administrator.

Windows 11 screenshot that shows a search for Command Promp in Start Menu while highlighting the Run as administrator option.

3. Type or Copy/Paste the following command and hit Enter:

DISM /Online /Cleanup-Image /CheckHealth
Command Prompt Windows 11 CheckHealth DISM command.

After you hit Enter, the DISM tool will run the CheckHealth command and look for any data corruption within the local image. If the command doesn't find any issues, it will say "No component store corruption detected". On the other hand, if it does find any corruptions, it will say "The component stored has been corrupted".

Advanced System Image Scan Using DISM

While the CheckHealth option works well as an initial diagnostic tool, the ScanHealth option will perform a more advanced scan that searches deeper for component store corruption. It will also save the report to a log file. Here's how you can use it:

1. From the Start menu, search for Command Prompt.

2. Right-click the first result, and select Run as administrator.

3. Type or Copy/Paste the following command and hit Enter:

DISM /Online /Cleanup-Image /ScanHealth
Windows 11 ScanHealth DISM command.

This process takes a bit longer than the CheckHealth command. You should see a progress bar indicating the completion percentage. If any issues are detected after the scan is complete, you can run the RestoreHealth command to repair the Windows image.

Repair the Windows system image

If you find any file or data corruptions after running CheckHealth or ScanHealth health commands, your next step is to run the RestoreHealth command. This command makes use of Windows Update to search and provide the necessary files required for fixing file corruptions. It repairs the Windows 11 system image but requires you to be connected to the internet.

1. From the Start menu, search for Command Prompt.

2. Right-click the first result, and select Run as administrator.

Windows 11 screenshot that shows a search for Command Promp in Start Menu while highlighting the Run as administrator option.

3. Type or Copy/Paste the following command and hit Enter:

DISM /Online /Cleanup-Image /RestoreHealth
Windows 11 Command Prompt screenshot that highlights the RestoreHealth DISM command.

This process takes a bit longer than the CheckHealth command. You should see a progress bar indicating the completion percentage. If any issues are detected after the scan is complete, you can run the RestoreHealth command to repair the Windows image.

Repair system image using Windows installation media

If your computer is not connected to the internet or the Windows Update component itself is corrupt, RestoreHealth can't do much on its own. Fortunately, you can mount a Windows ISO or use Windows installation media to fix the system image.

To do so, you'll have to first use the Media Creation Tool to create the ISO file. After you create the ISO file, don't run the setup process. Instead, follow the steps below:

1. Double-click the ISO file from the folder you saved it to earlier. This will mount it to your DVD Drive. Take note of the letter assigned to the drive. In our case, the drive letter is "D:".

Windows 11 File Explorer screenshot that highlights the DVD Drive.

2. In the Start menu, search for Command Prompt once again, right-click it, and select Run as administrator.

Windows 11 screenshot that shows a search for Command Promp in Start Menu while highlighting the Run as administrator option.

3. Type or Copy/Paste the following command and hit Enter. Make sure to replace "D:" with the drive letter of your Windows ISO file.

DISM /Online /Cleanup-Image /RestoreHealth /Source:D:\Sources\install.wim
Windows 11 Command Prompt screenshot that highlights the alternate RestoreHealth DISM command

This process will take the longest yet to complete. The command scans and repairs problems using the "install.wim" file within the Windows installation media.

Repair Windows installation with the SFC Utility

The DISM commands you used above focus on repairing the system image and source files, not the actual installed copy. After fixing issues with the system image, you can use the System File Checker (SFC) command tool to fix any issues with your Windows 10 or 11 installation. It's highly recommended that you run an SFC scan nearly every time you use DISM image repair commands.

1. From the Start menu, search for Command Prompt.

2. Right-click the first result, and select Run as administrator.

Windows 11 screenshot that shows a search for Command Promp in Start Menu while highlighting the Run as administrator option.

3. Type or Copy/Paste the following command and hit Enter:

SFC /scannow

After running the command above, the System File Checker utility will begin to verify the system file integrity to check for any corruption. If the Command Prompt seems stuck, try pressing Enter on your keyboard a couple of times to refresh the Window.

Leveraging DISM and SFC commands

Both the DISM and SFC commands make it easy to scan and repair any issues with corrupted files. While using the command prompt might seem technical to some people, it's as easy as finding the right commands and copying/pasting them into the terminal.

Comments

Popular posts from this blog

Windows activater failed

All in one windows credential sam and hash decripted and encripted(Dumping :sam: all security

Computer hardware Networking Interview Questions and Answers

Windows defender DisableAntiSpyware

Error Code: INET_E_RESOURCE_NOT_FOUND

eSIM vulnerabilities exploited by SIM swappers for phone numbers: Report