Solution 1:

Some things to check:

  • Make sure there are no entries in HKLM\System\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations. If there are, reboot to get them processed. Or do the renames manually and delete them.
  • Run DISM /Online /Cleanup-Image /RestoreHealth to clean up the component store.
  • Don't install on a Domain Controller.

Solution 2:

So I managed to resolve this by doing another clean install and then using the command below to install. Not sure why it worked this time.

add-windowsfeature rds-web-access -source f:\sources\winxsx