If D-Link's official driver fails, Microsoft released a native Realtek driver via Windows Update that works perfectly. You can force install it:
By following the troubleshooting steps and tips outlined in this article, you should be able to resolve issues with your D-Link DWA-171 not working on Windows 10. d-link dwa-171 not working windows 10
If still not working: