If you are trying to run a different, supported DISM command and still see Error 87, it is likely a : W 7 DISM Error 87 - Tweaking
Microsoft backported some DISM features to Windows 7 via an update (KB2966583), but the version shipped with Windows 7 natively does support the commands you see in modern Windows 10 guides.
If so, move to Fix 2.
You need to point DISM to a mounted install.wim file from your Windows 7 DVD or ISO.
Specifically, the /RestoreHealth switch with the /Online flag behaves entirely differently on Windows 7. If you copy-paste a Windows 10 command into a Windows 7 CMD window, you will trigger Error 87 immediately.
If the error persists, move to Method 3.