Finding the Free Space Difference Between Availability Groups Replicas


A friend was doing an analysis on a client system with Always On Availability Groups where he was preparing some database changes. He found some strange differences between the mount points on both servers when getting the replicas’ disk space information with the following command:

Get-DbaDiskSpace -ComputerName REPLICA1, REPLICA2 | Where-Object Label -like ‘*Data*’ | Sort-Object Label

As we can see on the picture, the Data01 and Data02 mount points on both servers had different amounts of free space.

He asked me if dbatools has any command that could help demystify these differences.

TL;DR

No. But dbatools has lots