This is script is useful when you are short of space on a drive and you need to know how much space can you get shrinking your databases. Although is shrinking is not a recommended practice some times you need to get free space in your drive. Just execute the script and it will tell you the free space you can obtain.
You gan modify the line where[UsageType] = 'data' to specify log or data files.
As well you can uncomment the line --where MB_Free < 5000 to specify drives with less than 'x mbytes'.