I am trying to create a external network drive using PowerShell 5.0. I Need those drive to display in My Computer. For that purpose I am using this follow command.
New-PSDrive -Name "X" -PSProvider FileSystem -Root "\\192.168.0.1\hde_path" -Persist
Is there anything wrong with this command? Because as per my understanding if I use -Persist it is should be displayed in the My Computer window.
After using this, the mapped drive X: is not being displayed in My Computer.
I had the same problem. My solution was to start the powershell ISE in "Normal-Mode" instead of the "Administrator-Mode" (PS run as Admin). I don't know why this phenomen appears, but the drives were displayed in explorer after I run the powershell ISE in Normal-Mode. Greets
When I run this from a script, it does not work, because the session expires on script completion.
It works when I paste into the PowerShell window, and then I can see the share appear in This PC
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With