Home:ALL Converter>Access denied in Windows cmd, but working in PowerShell

Access denied in Windows cmd, but working in PowerShell

Ask Time:2020-02-13T18:32:34         Author:blackcomb

Json Formatter

Running the following command:

dir "\\<Some Network Path>\"

gives this result when executed in a command prompt (cmd):

Access is denied.

and this (expected) result when executed in PowerShell:

    Directory:
    \\<Some Network Path>


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----       13.02.2020     11:11              0 test.txt

I know that dir is not the same command in cmd and PowerShell - but I don't understand why it may result in "Access denied" in cmd while working in PowerShell when executed on the same machine with the same user. Also, I can open the folder in Windows Explorer.

What can be possible reasons?

Thank you in advance.

Author:blackcomb,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/60205712/access-denied-in-windows-cmd-but-working-in-powershell
yy