WMIC, the tool being used to calculate disk statistics on Windows, is deprecated on Windows 10 21H1 and later (source).
You might want to update the code to use powershell commands instead, eg. powershell Get-CimInstance -ClassName Win32_LogicalDisk.