5
1
I'm trying to set location to mapped network drive Z in PowerShell and it's not working.
I have the following drive letters: C, D, E, Z. Where the first three are just local disks, and the Z is of course the network location mapped to the letter Z.
I can switch from C to D, to E, back to C again, but I cannot for the love of God switch to Z letter for some reason. I can however switch to that location, but I have to type in the network location instead of using the drive letter.
PS C:\Windows\system32> D:
PS D:\> C:
PS C:\Windows\system32> Z:
Set-Location : Cannot find drive. A drive with the name 'Z' does not exist.
At line:1 char:13
+ Set-Location <<<< Z:
+ CategoryInfo : ObjectNotFound: (Z:String) [Set-Location], DriveNotFoundException
+ FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.SetLocationCommand
PS C:\Windows\system32> Set-Location \\fileserver\karta
PS Microsoft.PowerShell.Core\FileSystem::\\fileserver\karta> C:
PS C:\Windows\system32> Z:
Set-Location : Cannot find drive. A drive with the name 'Z' does not exist.
At line:1 char:13
+ Set-Location <<<< Z:
+ CategoryInfo : ObjectNotFound: (Z:String) [Set-Location], DriveNotFoundException
+ FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.SetLocationCommand
PS C:\Windows\system32> Set-Location Z:
Set-Location : Cannot find drive. A drive with the name 'Z' does not exist.
At line:1 char:13
+ Set-Location <<<< Z:
+ CategoryInfo : ObjectNotFound: (Z:String) [Set-Location], DriveNotFoundException
+ FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.SetLocationCommand
PS C:\Windows\system32>
Why is it not working? Is this not supported in PowerShell... using drive letters to set location to a network location?
Just for the record I am running x86 version of PowerShell with admin elevation on x64 Windows 7. – Samir – 2014-04-07T13:36:34.420
That is very odd, I can't seem to replicate the issue. Does it work without admin elevation? – Alex McKenzie – 2014-04-07T13:58:55.083
@AlexMcKenzie Yup! It worked without admin elevation!? So what's the issue then?... – Samir – 2014-04-07T14:11:46.100