The Desktop Window Manager has exited with code (0x40010004)
This could be because of "Client Compatibility Settings". I had faced the same issue 10 mins ago after licensing my terminal server and this is how I fixed it.
- Go to 'Remote Desktop Session Host Configuration'
- In the 'Connections' section, right click on your connection name and select 'Properties'
- In properties window, go to 'Client Settings' tab
- Uncheck 'Limit Maximum Color Depth'
- Click apply and ok
- Now go to 'Remote Desktop Services Manager'
- Select your terminal server from left plane
- Right click on each user account under 'Users' tab on right plane and select Log Off
Done! next time users should get successful login.