We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

How to clean up restore health as an administrator

peter021072
peter021072 Posts: 470 Forumite
Seventh Anniversary 100 Posts Photogenic Name Dropper
edited 18 November at 9:44AM in Techie Stuff
Someone has asked me to run this command as an administrator
DISM /Online /Cleanup-Image /RestoreHealth SFC /SCANNOW
however, I'm struggling with entering the command by itself because the prompt C:/users/entra is in front, and I can't get rid of it. If I just place it in front it produces an error.  How can I run this command in that screen?


«13

Comments

  • flaneurs_lobster
    flaneurs_lobster Posts: 8,216 Forumite
    Sixth Anniversary 1,000 Posts Photogenic Name Dropper
    What's the error?
  • Have you tried cmd in search box?
  • vacheron
    vacheron Posts: 2,460 Forumite
    Part of the Furniture 1,000 Posts Name Dropper Photogenic
    edited 18 November at 10:24AM
    Don't worry about the text in front, that is simply the directory your prompt is currently located in. 

    The error may be due to something in the command you are typing / pasting

    As above, what is the error being returned? If it is anything about "elevated permissions" you will need to run CMD as an administrator.

    Also, the instruction is a 2 part process, you should enter "DISM /Online /Cleanup-Image" /RestoreHealth first, you will then need to wait a couple of minutes while the progress bar completes before you can enter the "SFC /SCANNOW" command.

    Also, I have never seen a problem where SFC /SCANNOW has actually fixed the issue, but there is always a first time!  :D
    • The rich buy assets.
    • The poor only have expenses.
    • The middle class buy liabilities they think are assets.
  • Newcad
    Newcad Posts: 1,932 Forumite
    1,000 Posts Second Anniversary Name Dropper Photogenic
    edited 18 November at 11:13AM
    Also Note - DISM can often look like it has got stuck at 62.3% when run on Windows 11.
    It isn't stuck and is still working (if you open Task Manager you can see that) so just let it get on with it.
    It can take 10-20 minutes, (or even a couple of hours on an older, slow machine), then suddenly jumps up to 100%.
    If yours does that 62.3% thing then you can still use the computer while waiting for DISM to complete.

    As already said don't worry about the text prompt, it's just showing what directory you are currently connected to.
    Here is a screenshot of what running DISM followed by SFC looks like in an elevated command window:

  • Neil_Jones
    Neil_Jones Posts: 9,694 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    That screenshot is Powershell, not command prompt.

    I presume DISM works in Powershell, but I've always used it in Command Prompt.

    Although depending on what you're trying to fix there may be other options.
  • Vitor
    Vitor Posts: 1,114 Forumite
    1,000 Posts First Anniversary Photogenic Name Dropper
    edited 18 November at 11:38AM
    I presume DISM works in Powershell, - 

    It does. The Terminal app in Windows 11 lets you open command shells in tabs, but defaults to opening PowerShell


  • SH88SH88
    SH88SH88 Posts: 54 Forumite
    10 Posts Name Dropper Photogenic

    Also, I have never seen a problem where SFC /SCANNOW has actually fixed the issue, but there is always a first time!  :D
    I have.

    As you inferred,  SFC often fixes nothing ( as there is nothing to fix), however I have occasionally seen it find and fix some corrupted files. 
  • peter021072
    peter021072 Posts: 470 Forumite
    Seventh Anniversary 100 Posts Photogenic Name Dropper
    What's the error?
    740. I need to somehow 'Run DISM and SFC to repair system files Open Command Prompt as Administrator and run: DISM /Online /Cleanup-Image /RestoreHealth SFC /SCANNOW'


  • vacheron
    vacheron Posts: 2,460 Forumite
    Part of the Furniture 1,000 Posts Name Dropper Photogenic
    edited 18 November at 3:31PM
    What's the error?
    740. I need to somehow 'Run DISM and SFC to repair system files Open Command Prompt as Administrator and run: DISM /Online /Cleanup-Image /RestoreHealth SFC /SCANNOW'


    Please see my first reply above, this suggests you are not running CMD as an administrator.

    When you type CMD in the search bar, before hitting enter, you need to select "Run as admninstrator" from the option list to the right.


    • The rich buy assets.
    • The poor only have expenses.
    • The middle class buy liabilities they think are assets.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 352.8K Banking & Borrowing
  • 253.8K Reduce Debt & Boost Income
  • 454.7K Spending & Discounts
  • 245.9K Work, Benefits & Business
  • 601.9K Mortgages, Homes & Bills
  • 177.7K Life & Family
  • 259.8K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16K Discuss & Feedback
  • 37.7K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.