Cant set-location to NAS drive or get-childitem using powershell

Lucky de Silva 1 Reputation point
2020-07-21T06:25:56.32+00:00

Hi
I have Netgear STORA attached to surfacePro4 using a USB to ethernet adapter.
I can ping successfully to the location \stora using both powershell and command prompt.
z: has been assigned to the required location on the stora
I can use DIR to get child items of z: using the command prompt:

C:\Users\desil>dir z:\aesd_data
Volume in drive Z is MyComputers
Volume Serial Number is 04A6-6059

Directory of z:\aesd_data

21/07/2020 03:51 PM <DIR> .
21/07/2020 03:51 PM <DIR> ..
20/07/2020 06:30 AM <DIR> Downloads
18/07/2020 04:59 PM <DIR> AESD
19/07/2020 02:29 AM <DIR> Home
20/07/2020 07:45 AM <DIR> Computer backups
18/07/2020 04:21 PM <DIR> Archive
18/07/2020 04:20 PM <DIR> SWAP
0 File(s) 0 bytes
8 Dir(s) 67,014,045,696 bytes free

but the powershell returns

PS C:\WINDOWS\system32> dir z:\aesd_data
dir : Cannot find drive. A drive with the name 'z' does not exist.
At line:1 char:1

  • dir z:\aesd_data
  • ~~~~~~~~~~~~~~~~
  • CategoryInfo : ObjectNotFound: (z:String) [Get-ChildItem], DriveNotFoundException
  • FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,389 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Rich Matheisen 45,096 Reputation points
    2020-07-21T21:34:51.92+00:00

    Does the Get-PSDrive cmdlet show that drive letter?

    1 person found this answer helpful.
    0 comments No comments

  2. Ian Xue (Shanghai Wicresoft Co., Ltd.) 30,381 Reputation points Microsoft Vendor
    2020-07-28T09:18:35.367+00:00

    Hi,

    Is there any update? Have you got a chance to verify above suggestions?

    Please feel free to let us know if more assistance needed.

    0 comments No comments