Applications run as administrator do not see the drive shared with OSX

Discussion in 'General Questions' started by OctavianT, Mar 12, 2018.

  1. OctavianT

    OctavianT Bit Poster

    On my machine, the `Z:` disk is shared between Windows and OSX through Parallels.
    If I run PowerShell without administrator privileges and do this:

    PS C:\Windows\system32> Z:

    Then I will be redirected successfully to the `Z:` drive.

    However, If I run PowerShell WITH administrator privileges and try this:

    PS C:\Windows\system32> Z:

    I get this 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

    Similarly, Visual Studio 2017 and Command Prompt, when ran with administrator privileges can not see the shared disk `Z:`.

    Why is that? How can I access the `Z:` drive when I run the code as an administrator?

Share This Page