#1. Go to Settings > System.

#2. Click on “Apps & features”

#3. Choose “Manage Optional features”

#4. Press the button “Add a feature”

#5. Select the package for Windows Developer Mode

#6. Click “Install”

#7. Reboot your PC

#8. Launch Command Prompt as Administrator

#9. Run: sc config debugregsvc start=auto

Finally, return to the “For Developers” Settings page. You will still see the error code, 0x80004005 but you should now be able to enable Windows Device Portal and the Device Discovery features.