Windows 10: We wrote pwershell script and it has deleted Windows 10 system files

Team credext 1 Reputation point
2021-05-30T19:47:13.373+00:00

Windows 10 home single language

In powershell we wrote a program to backup the files and then delete those files. But somehow unknowingly we ran that script with admin rights and due to incorrect logic to calculate current directory. The script got executed on windows folder and has deleted many files

Now I cannot see start button, windows 10 graphics are weird, search box of windows in my PC is disappeared and many more problems

Any suggestions how can I recover the system

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
12,075 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2021-05-31T09:30:35.687+00:00

    Hi,

    If windows system files are deleted accidently, you can try to run sfc /scannow to repair any corrupted or damaged Windows files. If they are found to be missing, it will replace the files.

    If it still doesn't work, the recommend way is Reset This PC. Make sure your important data is safely backed up.

    For your reference:

    How to restore accidentally deleted system files in Windows 10

    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    Best Regards,
    Candy

    --------------------------------------------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.