DISM RestoreHealth Error 87 usually appears when the command is typed incorrectly or the syntax is wrong. It commonly happens if spaces are missing, parameters are incorrect, or the command is not run in Administrator Command Prompt.
To fix it, open Command Prompt as Administrator and run the correct command:
DISM /Online /Cleanup-Image /RestoreHealth
Make sure there is a space before each slash parameter and that your Windows system files are not heavily corrupted.