Mounted Drive is Not Visible in PowerShell

Important

Before proceeding with troubleshooting, be sure to implement the following prerequisites for connecting to file systems from Windows instances:

Symptom: After installing Windows NFS client, you can successfully mount the file system from either Windows File Explorer or the Command Prompt (CMD) using mount or net use commands. However, the file system drive is not visible in PowerShell.

Cause: A known issue exists where drives mapped from outside PowerShell aren't visible from within PowerShell.

Solution: Unmount the file system and remount the file system within PowerShell, using options to make it visible in File Explorer and in the CMD application.

To unmount a file system using the CMD prompt
  1. Open Windows Command Line (CMD) and run as Administrator:

    • Go to Start and scroll down to Apps.
    • In the Windows System section, press Ctrl+Shift and click Command Prompt.
  2. In the Administrator: Windows Command Line (CMD) window, unmount the file system by typing the following. Replace 10.x.x.x: with the local subnet IP address assigned to your mount target, fs-export-path with the export path you specified when associating the file system with the mount target, and X with the drive letter of any available drive you want to map the file system to.

    Tip

    IP address and export path information is available in the Details page of the mount target associated with your file system. See To view details of a mount target for more information.
    umount 10.x.x.x:/fs-export-path X:
  3. Close the Administrator: Windows Command Line (CMD) window.
To map a drive in PowerShell and make it visible

You can map a drive in PowerShell and then use options to make it visible from File Explorer and the Windows Command Line (CMD).

  1. Open Windows PowerShell and run as Administrator:

    1. Go to Start and click the Windows PowerShell icon.
    2. In Windows PowerShell, type the following to run as Administrator:

      Start-Process powershell -Verb runAs
    3. In the User Account Control window, click Yes. A new Administrator: PowerShell window opens. You can close the standard PowerShell window to avoid confusing them.
  2. Type the following cmdlet. Replace 10.x.x.x: with the local subnet IP address assigned to your mount target, fs-export-path with the export path you specified when associating the file system with the mount target, and X with the drive letter of any available drive you want to map the file system to:

    New-PSDrive X -PsProvider FileSystem -Root \\10.x.x.x:\fs-export-path -Persist