I have a bunch of computers running Windows 8,1 connected by LAN to one central server that runs Server 2012 R2. I have all my scripts stored on the server, so to be able to run them from the other machines I added the scripts folder as a network location to the other machines.
My problem is that after every reboot trying to run a script (with PowerShell) that is stored on the server does not work, and I have to manually enter the mapped network location from File explorer, enter the credentials again and only then it works.
Every time I do that I check "Remember username and password", and yet I have to do it again after the next reboot.
Hope I was clear 🙂 Any ideas? Thanks!
Best Answer
Have you tried mapping a drive in file explorer?
Assuming the issue is with needing a different user's credentials to access the server's mapped location, try this: (This is more of a work-around than a solution, and exploiting a bug rather than a feature, but see below)
map network drive
window, checkReconnect at sign-in
andConnect using different credentials
If I explained this right, it will look like a normal mapped drive in file explorer, but be using the credentials of the other account when accessed in file explorer. Try your script now.