This question hasn't been updated since 2015, and doesn't solve the problem: Map a network drive via command prompt SPO .
Is there a way to map a sharepoint shared folder to a network drive without needing to be logged into internet explorer?
My use case is that I use task scheduler to automatically log in and run scripts. It needs to read and write files from shared drive. It does not have access to the cookies/ saved authentication for having the 'always signed in' option enabled.