先记录后,后整顿
获取所有的磁盘符号:
PS> $ [Environment]::GetLogicalDrives()
获取所有的磁盘信息(powershell version 1):
PS> $ Get-WmiObject -Class win32_logicaldisk
Refs:
- powershell 获取磁盘信息
获取所有的磁盘信息(powershell version 6):
PS> $ Get-CimInstance win32_logicaldisk
Refs:
- What Library for Powershell 6 contains the get-wmiobject command?