wis*_*shi 43 powershell list device
我有多个卷(现在几乎每个人都有):在Windows上,它们最终指定为C:,D:等等.如何在带有Powershell的"ls/mnt /"的Unix机器上列出这些内容?
bdu*_*kes 68
要获取所有文件系统驱动器,可以使用以下命令:
gdr -PSProvider 'FileSystem'
Run Code Online (Sandbox Code Playgroud)
gdr是别名Get-PSDrive,其中包括注册表的所有"虚拟驱动器"等.
小智 17
获取批量
你会得到:DriveLetter,FileSystemLabel,FileSystem,DriveType,HealthStatus,SizeRemaining和Size
小智 8
在Windows Powershell上:
Get-PSDrive
[System.IO.DriveInfo]::getdrives()
wmic diskdrive
wmic volume
Run Code Online (Sandbox Code Playgroud)
实用程序dskwipe:http://smithii.com/dskwipe
dskwipe.exe -l
Run Code Online (Sandbox Code Playgroud)
首先,在您使用的 Unix 上mount,不是ls /mnt:很多东西都没有安装在/mnt.
无论如何,有mountvolDOS 命令,它继续在 Powershell 中工作,还有特定于 Powershell 的Get-PSDrive.