在 Windows 服务器中配置存储池(物理磁盘 1 和物理磁盘 2)并在存储池外创建虚拟磁盘。创建虚拟磁盘后,可以在VDS服务中看到Physical disk 3(Virtual disk)。
Power shell 命令:get-physicaldisk
提供所有物理磁盘详细信息,包括物理磁盘 1 和物理磁盘 2。
是否存在等效于 get-physicaldisk
命令的 Windows API?
如果是,请向我推荐 API。
最佳答案
也许你可以使用Microsoft WMI - Windows Management Instrumentation通过 MSFT_PhysicalDisk
class 获取信息.
在这里https://stackoverflow.com/a/33359142/15485您可以找到一个 C 示例作为起点。
关于c++ - 与 powershell get-physicaldisk 命令等效的 Windows API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51761005/