[Solved] Unable to Access Mapped Network Drives in Windows 10.

I have a script in my Windows which helps me to mapped different shared locations as a drive.

net use G: \\server1\shared_folder /PERSISTENT:YES

On each logon, it used to mapped successfully (shared a blog on this too), however after upgrading my system to Windows 10 , it doesn’t work. So, I figured out one quick solution which might also be helpful for you guys.