1 [System.IO.DriveInfo]::GetDrives()|Where-Object{$_.DriveType -eq 3}|ForEach-Object{$_.Name}
C:D:E:F:\
获取盘符
原文:http://www.cnblogs.com/XiaoCY/p/7487545.html