in my powershell prompt, logged into a Windows 10 PC as Domain\UserA
i can run the net use command to see my shared drives
net use
lists
+--------+-------+----------------+---------------------------+
| Status | local | Remote | Network |
+--------+-------+----------------+---------------------------+
| OK | H: | \\server1\path | Microsoft Windows Network |
| OK | I: | \\server2\path | Microsoft Windows Network |
+--------+-------+----------------+---------------------------+
i can then run
i:
and the prompt switches to I:\>
however, If I run the powershell prompt as Domain\UserB
and run the net use
comand
I get
+-------------+-------+----------------+---------------------------+
| Status | local | Remote | Network |
+-------------+-------+----------------+---------------------------+
| Unavailable | H: | \\server1\path | Microsoft Windows Network |
| Unavailable | I: | \\server2\path | Microsoft Windows Network |
| Unavailable | Z: | \\server3\path | Microsoft Windows Network |
+-------------+-------+----------------+---------------------------+
as this profile has the same H: and I: drive as the first one but also a z: drive.
if i then run
I:
I get Set-Location : Cannot find drive. A drive with the name 'I' does not exist
I can perform the same process in command prompt and i get the same result , although with command prompt's version of the error: The system cannot find the drive specified
If I run a GUI based program such as notepad as Domain\UserB
and do a File>Open, I can see the i:\ drive in the explorer pane and open it and select a file
This happens with all of the mapped drives
why can i not change directory to the mapped drive using when running Powershell / command prompt as the Domain\userB