/scanhealth is compatible with Win7+, /restorehealth is only available on 8+. To be honest on a windows 7 machine there is not point running scan health, the results are never helpful. DISM on windows 7 is rather outdated compared to 8+, on a Windows 7 machine you will be better of to run SURT (The system update readiness tool) the results from SURT are a lot more accurate. SURT is not available on windows 8+ unfortunately and we are left to use DISM.