This command verifies that your non-dynamic disks are aligned according to physical constraints.
Returns $true or $false by default for one server. Returns Server name and IsBestPractice for more than one server.
Specify -Detailed for additional information which returns some additional optional “best practice” columns, which may show false even though you pass the alignment test. This is because your offset is not one of the “expected” values that Windows uses, but your disk is still physically aligned.
Please refer to your storage vendor best practices before following any advice.
To test the disk alignment of a single server named sqlserver2014a
Test-DbaDiskAlignment -ComputerName sqlserver2014a
To test the disk alignment of mulitiple servers
Test-DbaDiskAlignment -ComputerName sqlserver2014a, sqlserver2014b, sqlserver2014c
To see the details about the disk alignmenet calcualtions from multiple servers
Test-DbaDiskAlignment -ComputerName sqlserver2014a, sqlserver2014b, sqlserver2014c -Detailed
Disk Partition Alignment Best Practices for SQL Server – A great article and behind most of this code.
Getting Partition Offset information with Powershell – Thanks to Jonathan Kehayias!
Decree: Set your partition Offset and block Size – make SQL Server faster – Thanks to Jen McCown!
Disk Performance Hands On – Thanks to Kendal Van Dyke!
Get WMI Disk Information – Thanks to jbruns2010!