Perseides said:
Ok, thanks for the instructions. Problem solved.

How do I prevent this from happening again? Delete the windows files? Reformat?
Sorry for the late reply.

A couple of things I wanted to mention:

You may wish to change the owner of your root d: drive back to "System", without checking "replace owner on subcontainers and objects". Also, you may wish to change the owner for "System Volume Information" and the "recycle bin" back to "System" this time replacing the owner on subcontainers, etc. I'm not sure this makes a difference, but I did this on my two affected d: and e: drives.

This problem should not recur on a drive level unless you reinstall Windows or add a new (or re-used) drive to your current OS.
There is, however, a rather severe and recurrent bug related to OneDrive on many systems which can cause the security permissions to reset for certain user files and folders every reboot. I started a thread on the Microsoft Security boards that addresses the issue and outlines my fix. The boards appear to be down right now, so I'll add a link later if you wish...let me know!