Wednesday, January 8, 2025

// // Leave a Comment

Solved- Mounted Disk is not Visible in PowerShell


 

Recently I faced one issue with the mounted disk in PowerShell.

1. I was able to access mounted disk if I open normal PowerShell.

2. But when I try to access mounted drive from elevated PowerShell mode then I received below error.

Set-Location : Cannot find drive. A drive with the name 'Z' does not exist.


At line:1 char:1
+ Set-Location $MyInvocation.MyCommand.Name
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Z:String) [Set-Location], DriveNotFoundException
    + FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.SetLocationCommand


Then after playing I found below solution.

1. Unmount the mounted disk from Windows Explorer or PowerShell.

2. Open PowerShell in elevated mode (Run as Administrator) and then mount the disk.

New-PSDrive -Name "Z" -Root "\\Santosh101.file.core.windows.com\downloads" -PSProvider "FileSystem" -Persist 




Read More