December 12, 2011

Subscribe

Export Index Sizes to Excel in Powershell

by Scott Newman

Here’s a quick script to write your index sizes in KB to Excel in powershell. The code to write to Excel was pilfered from here. Obviously, this isn’t 100% accurate, as you’d have to execute the sys.dm_db_index_physical_stats function in detailed mode to get detailed information, but this is a good rough estimate.