Share via

Script issue with SFC

Anonymous
2023-01-24T23:33:40+00:00

Hello!

I am working on getting some scripts working to do a lot of remote troubleshooting done for me and I am running into an error when trying to run the command in powershell:

cmd /c 'sfc /scannow > out'

get-content out -Encoding Unicode | where { $_ } # singlespace

The idea is that it should run the system file checker silent for the end user but give an output to me, however I am running into the issue of: Windows Resource Protection could not start the repair service.

I have gone ahead and confirmed that the machine can update, on the machine it's self I can run this but not remotely. This doesn't happen on every machine that I am doing this on, so I am thinking that it's going to be computer specific issues. I have looked at other posts for this error, but they don't seem to resolve the issue I am having. Does anyone have a suggestion on where to go from here?

Windows for home | Windows 10 | Performance and system failures

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-01-25T00:11:59+00:00

    Hello Brett. I'm Greg, here to help you with this.

    Sounds like this might be for an organization. If this is being used by an organization then please ask at our sister forums for IT Professionals, Q&A forums here: https://docs.microsoft.com/en-US/answers/index....

    Microsoft Community is strictly an end-consumer forum. Solutions we give here may conflict with the organization''s Group Policy which we do not use in consumer forums at all.

    There are also equally good (and sometimes busier) 3rd party IT Pro forums here:

    https://www.techrepublic.com/forums/

    https://www.spiceworks.com/

    If it's not an organization, or it if is and you can't get the scripting help you need there, the scripting experts who speak that as a language are Developers. So I would ask for scripting help at one of the developers' forums here:

    https://social.msdn.microsoft.com/Forums/en-US/...

    https://stackoverflow.com/

    https://developer.microsoft.com/en-us/windows/s...

    https://www.quora.com/What-are-the-top-10-websi...

    I hope it helps.

    ____________________________________________

    Standard Disclaimer: There are links to non-Microsoft websites. The pages appear to be providing accurate, safe information. Watch out for ads on the sites that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the sites before you decide to download and install it.

    Was this answer helpful?

    0 comments No comments