I ran into this problem when working with symlinks on Windows 8.1 and then Windows 10. See Windows 10 symlinks.
The solution is pretty simple and it was tested and works on Windows 8.1 and Windows 10.
Note that scripts like this will eventually find their way somewhere into my git repository: https://github.com/spiralofhope/shell-random/tree/master