![Photo by Brian McGowan on Unsplash Photo by Brian McGowan on Unsplash](/var/ezflow_site/storage/images/archive/2022/71/manage-windows-server-storage-with-powershell/photobybrianmcgowanonunsplash_robots.png/198774-1-eng-US/PhotobyBrianMcGowanonUnsplash_Robots.png1_medium.png)
Photo by Brian McGowan on Unsplash
Manage Windows Server storage with PowerShell
Robots in the Data Center
Experienced Windows administrators are familiar with numerous tools that help them manage hard drives, partitions, and filesystems. The portfolio extends from the Microsoft Management Console (MMC)-based Disk Management (diskmgmt.msc
) and command-line tools to the Server Manager and Windows Admin Center. For more complex storage systems, you have tools such as iSCSICLI for configuring built-in Internet small computer systems interface (iSCSI) initiators or the multipath I/O control panel (MPIO CPL
) graphical configuration applet for storage multipathing.
These tools are perfectly suitable for individual tasks, but when it comes to configuring a large number of servers or migrating complex storage landscapes, the tools quickly reach their limits. The syntax is not consistent, output depends on the operating system language set, and graphical interfaces do not support automation. In precisely such cases administrators turn their attention to PowerShell, which is also particularly important because it enables visual management of a Windows machine's local subsystems in Windows Admin Center.
This article references the current Server 2022 but should also apply to Server 2019 and 2016 without any changes. However, I look exclusively at provisioning storage capacity, which is served up by Server Message Block (SMB), Distributed File System (DFS), Network File System (NFS), or iSCSI supported by separate, sophisticated PowerShell features.
Physical and Logical Drives
Classical administration tasks with regard to the hard drives, their partitioning, and the storage volumes on them are traditionally the domain of the Disk Management MMC console or the diskpart
command-line tool. The Get-Disk
command in PowerShell is useful for an initial overview of the existing hard drives (Figure
Buy this article as PDF
(incl. VAT)