Hi very nice article.
Only xp_cmdshell is not always enabled, because of possible security reasons. From SQL Server 2008R2 the Dynamic Management view sys.dm_os_volume_stats can be used. So I would prefer this one..
@@SERVERNAME AS SQLInstance
, DOVS1.logical_volume_name AS VolumeName
, DOVS1.volume_mount_point AS DiskDrive
, DOVS1.available_bytes AS FreeSpace
, DOVS1.total_bytes AS CurrentSize
FROM sys.master_files MF1
CROSS APPLY sys.dm_os_volume_stats(mf1.database_id, mf1.FILE_ID) DOVS1
Sizes are in bytes so devide by 1048576.0 to get sizes in MB..