When installing SharePoint Foundation 2013, I came across an issue installing the pre-reqs. The installer would keep failing on the Applicaiton Server Role, Web Server (IIS) Role.
For some reason, the installer is looking for C:\Windows\System32\ServerManagerCMD.exe however, if you look for that file, you’ll only see ServerManager.exe.
A quick fix is to make a copy of ServerManager.exe and rename the copy to ServerManagerCMD.exe.
Run the pre-req installer again to confirm it works:
After the install is finished, you’ll see the confirmation: