• Personally i prefer to use WMI to get the volume info, it works for mounted and non mounted volumes so it's completely generic

    Roy Moore (2/16/2012)


    This script didn't work for me. It worked on a server without MountPoints but not on a server with.

    I use the following as a CMDEXEC job step, it works for all volumes on the server

    wmic volume get capacity, "free space", name

    I then suck the resulting data into SQL Server and process it which is then used to drive an SSRS report detailing database size info. You could also insert this data into a history table and build up stats over time

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉