Powershell 磁盘管理

luq*_*on7 6 windows powershell storage

欢迎,我有关于通过 Powershell 管理磁盘的问题。是否有可能(如在 DISKPART 中) - 将磁盘类型更改为动态, - 创建镜像磁盘, - 创建 raid-5 卷, - 扩展卷但是是否可以使用 Powershell 做到这一点?我的意思是我需要使用 Powershell 而不是 DISKPART 来做这些事情,但找不到任何解决方案

bat*_*a09 8

不幸的是,PowerShell 中没有实现某些 diskpart 功能。您可以使磁盘联机、初始化、创建基本卷(GPT 和 MBR)。无法使用 PowerShell 创建动态磁盘。因此,不使用 DISKPART 就无法创建跨区、条带、镜像或奇偶校验卷。

Microsoft 宣传存储空间而不是“动态磁盘”。更多关于 pro 和 contra 的信息 - https://serverfault.com/a/883491/382022

存储空间可以在 PowerShell 中完全管理。这里有一些文章(主要针对服务器版本,但客户端的命令相同):

“使用 PowerShell 管理磁盘” - https://4sysops.com/archives/managing-disks-with-powershell/

存储空间的可用 cmdlet - https://docs.microsoft.com/en-us/powershell/module/storagespaces/?view=winserver2012r2-ps&viewFallbackFrom=win10-ps

“创建存储池和存储空间” - https://lazywinadmin.com/2013/08/ws2012-storage-creating-storage-pool.html

“自动存储分层” - https://www.starwindsoftware.com/blog/configure-a-resilient-volume-on-windows-server-2016-using-storage-spaces