On Windows, when I try to access a network location (specifically, a drive on another Linux computer being shared with Samba), it will prompt me for a username and password. What I find interesting is that if I enter the username and password and don't tick the box to remember it, then when I access the drive, I cannot open powershell or command prompt as administrator at the network drive location, but I can as non-admin:
set-location : Access is denied
At line:1 char:1
+ set-location '\\192.168.0.210\sambashare'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (\\192.168.0.210\sambashare:String) [Set-Location], UnauthorizedAccessException
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.PowerShell.Commands.SetLocationCommand
set-location : Cannot find path '\192.168.0.210\sambashare' because it does not exist.
At line:1 char:1
- set-location '\192.168.0.210\sambashare'
+ CategoryInfo : ObjectNotFound: (\\192.168.0.210\sambashare:String) [Set-Location], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand
However, if I restart the computer, sign in again, and then I do tick the box to remember the password, I am able to open as administrator. Similarly, if I delete the credential from the Windows credential manager, I can't open as admin, but if I restore it, then I can. In other words, it seems to be dependent on the sign-in credentials being stored in the Windows credential manager. I have been able to repeat this with other Windows machines as well.
Can somebody explain why this is? I'm on Windows 10 v1607 build 14393.
