1
When I run this piece of code in Powershell:
net use \\$computerName\c$\ $adminPW /user:$adminUN /Persistent:No
I get:
System error 53 has occurred.
The network path was not found.
However, if I run:
net use \\$computerName\c$\subfolder $adminPW /user:$adminUN /Persistent:No
It executes successfully assuming subfolder
exists. Why is this happening? I am running this code in order to eventually create a folder within c$
, maybe there is an alternative method?
1Try as
net use \\$computerName\c$ $adminPW /user:$adminUN /Persistent:No
and remove that backslash from thec$\\
if you are trying to map to the root of the hidden "C" share – Pimp Juice IT – 2018-02-28T18:51:10.030That did it! Thank you! I could have sworn I had tried that but guess not :) – user1362548 – 2018-02-28T18:55:59.550
You could omit the whole
c$\\
really, since Windows stores credentials per-host anyway (not per-share). – user1686 – 2018-02-28T19:13:39.033