Powershell 获取NAS驱动器信息

Powershell 获取NAS驱动器信息,powershell,Powershell,我想使用下面的命令获取NAS驱动器的详细信息,如所有者、访问权限、路径等,但是,它没有给出我期望的结果: Get-PSDrive -PSProvider FileSystem | %{$_.Root } A:\ C:\ D:\ Y:\ Z:\ When I run only first part of the command like below.. Get-PSDrive -PSProvider FileSystem Name Used (GB) Free (G

我想使用下面的命令获取NAS驱动器的详细信息,如所有者、访问权限、路径等,但是,它没有给出我期望的结果:

Get-PSDrive -PSProvider FileSystem | %{$_.Root }
A:\
C:\
D:\
Y:\
Z:\

When I run only first part of the command like below..
Get-PSDrive -PSProvider FileSystem

Name           Used (GB)     Free (GB) Provider      Root                                               CurrentLocation
----           ---------     --------- --------      ----                                               ---------------
A                                      FileSystem    A:\
C                  26.82         23.18 FileSystem    C:\                                     Users\sa-its-sd-na-vco2d-d
D                    .03          9.96 FileSystem    D:\
Y                 112.84        137.16 FileSystem    \\exmaple.hac.com\opp$
Z                                      FileSystem    Z:\

我的目的是获得
\\exmaple.hac.com\opp$
,但没有得到它。知道如何获取它吗?

问题是,您使用的是
Root
,但您想要
DisplayRoot

我想您也可以使用
选择

Get-PSDrive -PSProvider FileSystem | Select DisplayRoot
将输出如下内容:

A:\
C:\                   
D:\
\\exmaple.hac.com\opp$
Z:\
这将只选择根列。如果需要更多,例如名称和显示根:

Get-PSDrive -PSProvider FileSystem | Select Name,Root