Home Forums SQL Server 2008 T-SQL (SS2K8) Looking script to get the available disk space and other details. RE: Looking script to get the available disk space and other details.

  • Depending on the version of Windows your servers are running, you should be able to get the disk space information doing something like this:

    EXEC xp_CMDShell 'wmic volume get capacity,caption,freespace'

    You could insert the return data into a table variable, then add on the server name and such.