skip to Main Content

Get allocation unit size with PowerShell

The allocation unit size or named block size of a partition is vital for the systems. Think about the system performance. A partition is default formatted with a standard 4 KB allocation unit size. It does not mean that it’s the best practice. Microsoft recommends that partitions have a 64 KB allocation unit size for SQL Servers and Exchange Servers. In this article, you will learn how to find the partitions allocation unit size with PowerShell.

Information about the allocation unit size

Before we start to find the partition allocation unit size or named block size, it’s good to know the difference between:

  • Disk
  • Volume
  • Partition

A disk does have one volume, and the volume can split into multiple partitions.

For example, you have a 100 GB disk. It means that the volume is 100 GB. You can split the 100 GB volume into partitions of the size 20 GB, 20 GB, and 60 GB. Thus, you will have one or more partitions. In every partition, you can set a different allocation unit size.

Note: You can set the allocation unit size differently in every partition.

Get allocation unit size with PowerShell

We like to get the allocation unit size on all the partitions of the Exchange Server EX01. Run PowerShell as administrator and run the Get-CimInstance cmdlet.

PS C:\> Get-CimInstance -ClassName Win32_Volume | Select-Object Label, BlockSize | Format-Table -AutoSize

Label     BlockSize
-----     ---------
System         4096
DB01 Data     65536
DB01 Logs     65536
DB02 Data     65536
DB02 Logs     65536
DB03 Data     65536
DB03 Logs     65536
DB04 Data     65536
DB04 Logs     65536
OSDisk         4096

BlockSize 65536 = 64 KB allocation unit size. BlockSize 4096 = 4 KB allocation unit size.

As a result, we have 10 partitions on the EX01 server, an explanation of every partition:

  • System partition is hidden and created by default when you install an Operating System (OS)
  • DB01/DB02/DB03/DB04 Data and Logs partitions are the Exchange database data and logs
  • OSDisk partition is the Operating System (OS)

Read more: Configure ReFS volume Exchange 2013/2016/2019 »


To summarize, you learned how to get the allocation unit size with PowerShell. If you have SQL or Exchange Server, make sure that the block size is 64 KB. Microsoft did write an excellent document about the Get-CimInstance cmdlet.

Did you enjoy this article? You may also like Exchange database best practices. Don’t forget to follow us and share this article.



ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has 2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *