Assuming I have a mapped drive M:\ to \\SomeServer\SomeShare and in powershell I'm in the folder M:\SomeFolder how do I convert that to a UNC path, i.e. \\SomeServer\SomeShare\SomeFolder.
|
| |||
feedback
|
|
I'm fairly new to PowerShell, so the code below may be poor quality. However, it should get the information you want:
$uncPath should contain the UNC path that you are looking for. | |||
feedback
|
|
For any one interested in the RunAs script for StExBar it is:
And the command line in StExBar is:
Replace the path with where ever you keep the RunAs.ps1 script, I like to store mine in the root of my home folder. | ||||
|
feedback
|