1 [System.IO.DriveInfo]::GetDrives()|Where-Object{$_.DriveType -eq 3}|ForEach-Object{$_.Name}
C:\
D:\
E:\
F:\
1 [System.IO.DriveInfo]::GetDrives()|Where-Object{$_.DriveType -eq 3}|ForEach-Object{$_.Name}
C:\
D:\
E:\
F:\
转载于:https://www.cnblogs.com/XiaoCY/p/7487545.html